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

@@ -389,7 +389,7 @@ void DragController::releaseMouse(QWidgetOrQuick *target)
}
}
FloatingWindow *DragController::windowBeingDragged() const
FloatingWindow *DragController::floatingWindowBeingDragged() const
{
return m_windowBeingDragged ? m_windowBeingDragged->floatingWindow()
: nullptr;
@@ -401,6 +401,11 @@ void DragController::enableFallbackMouseGrabber()
m_fallbackMouseGrabber = new FallbackMouseGrabber(this);
}
WindowBeingDragged *DragController::windowBeingDragged() const
{
return m_windowBeingDragged.get();
}
static QMouseEvent *mouseEvent(QEvent *e)
{
switch (e->type()) {