File tree Expand file tree Collapse file tree 2 files changed +8
-13
lines changed Expand file tree Collapse file tree 2 files changed +8
-13
lines changed Original file line number Diff line number Diff line change @@ -248,15 +248,6 @@ void CDockFocusController::onFocusWindowChanged(QWindow *focusWindow)
248248 return ;
249249 }
250250
251- #if defined(Q_OS_UNIX) && !defined(Q_OS_MACOS)
252- // bring the main application window that hosts the dock manager in front of
253- // any other application
254- d->DockManager ->raise ();
255-
256- // ensure that the dragged floating window is in front of the main application window
257- focusWindow->raise ();
258- #endif
259-
260251 auto vDockWidget = focusWindow->property (FocusedDockWidgetProperty);
261252 if (!vDockWidget.isValid ())
262253 {
Original file line number Diff line number Diff line change @@ -530,12 +530,16 @@ CDockManager::CDockManager(QWidget *parent) :
530530 window ()->installEventFilter (this );
531531
532532#if defined(Q_OS_UNIX) && !defined(Q_OS_MACOS)
533- connect (qApp, &QApplication::focusWindowChanged, [](QWindow* focusWindow)
533+ connect (qApp, &QApplication::focusWindowChanged, [this ](QWindow* focusWindow)
534534 {
535- // bring modal dialogs to foreground to ensure that they are in front of any
536- // floating dock widget
537- if (focusWindow && focusWindow->isModal ())
535+ if (focusWindow)
538536 {
537+ // bring the main application window that hosts the dock manager in front of
538+ // any other application
539+ this ->raise ();
540+
541+ // ensure that the dragged floating window is in front of the main application window
542+ // this will also ensure that modal dialogs come to foreground
539543 focusWindow->raise ();
540544 }
541545 });
You can’t perform that action at this time.
0 commit comments