Skip to content

Commit

Permalink
Added Q_OS_WIN around the installation of the eventFilter in Floating…
Browse files Browse the repository at this point in the history
…DockContainer because it is only required for Windows
  • Loading branch information
githubuser0xFFFF committed Apr 1, 2020
1 parent 28dc374 commit 998fe9f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/FloatingDockContainer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 998fe9f

Please sign in to comment.