diff --git a/src/DockFocusController.cpp b/src/DockFocusController.cpp index 57112c7..57d2c95 100644 --- a/src/DockFocusController.cpp +++ b/src/DockFocusController.cpp @@ -248,6 +248,15 @@ void CDockFocusController::onFocusWindowChanged(QWindow *focusWindow) return; } +#if defined(Q_OS_UNIX) && !defined(Q_OS_MACOS) + // bring the main application window that hosts the dock manager in front of + // any other application + d->DockManager->raise(); + + // ensure that the dragged floating window is in front of the main application window + focusWindow->raise(); +#endif + auto vDockWidget = focusWindow->property(FocusedDockWidgetProperty); if (!vDockWidget.isValid()) { diff --git a/src/DockManager.cpp b/src/DockManager.cpp index 99b432c..a9bfa85 100644 --- a/src/DockManager.cpp +++ b/src/DockManager.cpp @@ -1523,6 +1523,16 @@ QVariant CDockManager::configParam(eConfigParam Param, QVariant Default) } +//=========================================================================== +void CDockManager::raise() +{ + if (parentWidget()) + { + parentWidget()->raise(); + } +} + + } // namespace ads //--------------------------------------------------------------------------- diff --git a/src/DockManager.h b/src/DockManager.h index 08897bd..92744f7 100644 --- a/src/DockManager.h +++ b/src/DockManager.h @@ -770,6 +770,12 @@ public Q_SLOTS: */ void hideManagerAndFloatingWidgets(); + /** + * Calls raise() for the widget that hosts this dock manager. + * This will bring the widget in front of any other application that is running + */ + void raise(); + Q_SIGNALS: /** * This signal is emitted if the list of perspectives changed.