Skip to content

Commit 998fe9f

Browse files
Added Q_OS_WIN around the installation of the eventFilter in FloatingDockContainer because it is only required for Windows
1 parent 28dc374 commit 998fe9f

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/FloatingDockContainer.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -385,7 +385,9 @@ void CFloatingDockContainer::moveEvent(QMoveEvent *event)
385385
switch (d->DraggingState)
386386
{
387387
case DraggingMousePressed:
388+
#ifdef Q_OS_WIN
388389
qApp->installEventFilter(this);
390+
#endif
389391
d->setState(DraggingFloatingWidget);
390392
d->updateDropOverlays(QCursor::pos());
391393
break;
@@ -484,8 +486,7 @@ bool CFloatingDockContainer::event(QEvent *e)
484486
// It is really great to work around the whole NonClientMouseArea
485487
// bugs
486488
#if (QT_VERSION >= QT_VERSION_CHECK(5, 12, 2))
487-
if (e->type()
488-
== QEvent::NonClientAreaMouseButtonPress /*&& QGuiApplication::mouseButtons().testFlag(Qt::LeftButton)*/)
489+
if (e->type() == QEvent::NonClientAreaMouseButtonPress /*&& QGuiApplication::mouseButtons().testFlag(Qt::LeftButton)*/)
489490
#else
490491
if (e->type() == QEvent::NonClientAreaMouseButtonPress && QGuiApplication::mouseButtons().testFlag(Qt::LeftButton))
491492
#endif

0 commit comments

Comments
 (0)