mirror of
https://github.com/githubuser0xFFFF/Qt-Advanced-Docking-System.git
synced 2025-01-13 08:40:26 +08:00
Added Q_OS_WIN around the installation of the eventFilter in FloatingDockContainer because it is only required for Windows
This commit is contained in:
parent
28dc374fc2
commit
998fe9fa11
@ -385,7 +385,9 @@ void CFloatingDockContainer::moveEvent(QMoveEvent *event)
|
|||||||
switch (d->DraggingState)
|
switch (d->DraggingState)
|
||||||
{
|
{
|
||||||
case DraggingMousePressed:
|
case DraggingMousePressed:
|
||||||
|
#ifdef Q_OS_WIN
|
||||||
qApp->installEventFilter(this);
|
qApp->installEventFilter(this);
|
||||||
|
#endif
|
||||||
d->setState(DraggingFloatingWidget);
|
d->setState(DraggingFloatingWidget);
|
||||||
d->updateDropOverlays(QCursor::pos());
|
d->updateDropOverlays(QCursor::pos());
|
||||||
break;
|
break;
|
||||||
@ -484,8 +486,7 @@ bool CFloatingDockContainer::event(QEvent *e)
|
|||||||
// It is really great to work around the whole NonClientMouseArea
|
// It is really great to work around the whole NonClientMouseArea
|
||||||
// bugs
|
// bugs
|
||||||
#if (QT_VERSION >= QT_VERSION_CHECK(5, 12, 2))
|
#if (QT_VERSION >= QT_VERSION_CHECK(5, 12, 2))
|
||||||
if (e->type()
|
if (e->type() == QEvent::NonClientAreaMouseButtonPress /*&& QGuiApplication::mouseButtons().testFlag(Qt::LeftButton)*/)
|
||||||
== QEvent::NonClientAreaMouseButtonPress /*&& QGuiApplication::mouseButtons().testFlag(Qt::LeftButton)*/)
|
|
||||||
#else
|
#else
|
||||||
if (e->type() == QEvent::NonClientAreaMouseButtonPress && QGuiApplication::mouseButtons().testFlag(Qt::LeftButton))
|
if (e->type() == QEvent::NonClientAreaMouseButtonPress && QGuiApplication::mouseButtons().testFlag(Qt::LeftButton))
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user