indicators: Depend less on FloatingWindow

Deal in terms of WindowBeingDragged instead, as wayland won't have
a floating window being dragged
This commit is contained in:
Sergio Martins
2020-10-14 19:24:35 +01:00
parent 1219ba90af
commit c2cc914b5c
8 changed files with 40 additions and 18 deletions

View File

@@ -19,7 +19,6 @@
namespace KDDockWidgets {
class FloatingWindow;
class DropArea;
class DOCKS_EXPORT DropIndicatorOverlayInterface : public QWidgetAdapter
@@ -47,7 +46,7 @@ public:
explicit DropIndicatorOverlayInterface(DropArea *dropArea);
void setHoveredFrame(Frame *);
void setWindowBeingDragged(const FloatingWindow *);
void setWindowBeingDragged(bool);
QRect hoveredFrameRect() const;
bool isHovered() const;
DropLocation currentDropLocation() const;
@@ -77,8 +76,8 @@ protected:
virtual void updateVisibility() {};
Frame *m_hoveredFrame = nullptr;
QPointer<const FloatingWindow> m_windowBeingDragged;
DropArea *const m_dropArea;
bool m_draggedWindowIsHovering = false;
};
}