From 998fe9fa11939eb28dd021ca11d5302c4fe2a005 Mon Sep 17 00:00:00 2001 From: Uwe Kindler Date: Wed, 1 Apr 2020 08:36:33 +0200 Subject: [PATCH] Added Q_OS_WIN around the installation of the eventFilter in FloatingDockContainer because it is only required for Windows --- src/FloatingDockContainer.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/FloatingDockContainer.cpp b/src/FloatingDockContainer.cpp index 2e89667..1e3c1d5 100644 --- a/src/FloatingDockContainer.cpp +++ b/src/FloatingDockContainer.cpp @@ -385,7 +385,9 @@ void CFloatingDockContainer::moveEvent(QMoveEvent *event) switch (d->DraggingState) { case DraggingMousePressed: +#ifdef Q_OS_WIN qApp->installEventFilter(this); +#endif d->setState(DraggingFloatingWidget); d->updateDropOverlays(QCursor::pos()); break; @@ -484,8 +486,7 @@ bool CFloatingDockContainer::event(QEvent *e) // It is really great to work around the whole NonClientMouseArea // bugs #if (QT_VERSION >= QT_VERSION_CHECK(5, 12, 2)) - if (e->type() - == QEvent::NonClientAreaMouseButtonPress /*&& QGuiApplication::mouseButtons().testFlag(Qt::LeftButton)*/) + if (e->type() == QEvent::NonClientAreaMouseButtonPress /*&& QGuiApplication::mouseButtons().testFlag(Qt::LeftButton)*/) #else if (e->type() == QEvent::NonClientAreaMouseButtonPress && QGuiApplication::mouseButtons().testFlag(Qt::LeftButton)) #endif