diff --git a/src/DockFocusController.cpp b/src/DockFocusController.cpp index 595c9fa..0859c1a 100644 --- a/src/DockFocusController.cpp +++ b/src/DockFocusController.cpp @@ -264,7 +264,7 @@ void CDockFocusController::onFocusWindowChanged(QWindow *focusWindow) //=========================================================================== void CDockFocusController::onApplicationFocusChanged(QWidget* focusedOld, QWidget* focusedNow) { - Q_UNUSED(focusedOld); + Q_UNUSED(focusedOld); if (d->DockManager->isRestoringState()) { diff --git a/src/DockManager.cpp b/src/DockManager.cpp index ecb558c..bbca9d6 100644 --- a/src/DockManager.cpp +++ b/src/DockManager.cpp @@ -45,6 +45,7 @@ #include #include #include +#include #include "FloatingDockContainer.h" #include "DockOverlay.h" @@ -500,6 +501,16 @@ CDockManager::CDockManager(QWidget *parent) : #ifdef Q_OS_LINUX window()->installEventFilter(this); + + connect(qApp, &QApplication::focusWindowChanged, [](QWindow* focusWindow) + { + // bring modal dialogs to foreground to ensure that they are in front of any + // floating dock widget + if (focusWindow && focusWindow->isModal()) + { + focusWindow->raise(); + } + }); #endif } diff --git a/src/FloatingDockContainer.cpp b/src/FloatingDockContainer.cpp index 2a32786..869c7d7 100644 --- a/src/FloatingDockContainer.cpp +++ b/src/FloatingDockContainer.cpp @@ -515,6 +515,13 @@ void FloatingDockContainerPrivate::updateDropOverlays(const QPoint &GlobalPos) return; } +#ifdef Q_OS_LINUX + if (qApp->activeModalWidget()) + { + return; + } +#endif + auto Containers = DockManager->dockContainers(); CDockContainerWidget *TopContainer = nullptr; for (auto ContainerWidget : Containers)