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)
248
248
return ;
249
249
}
250
250
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
-
260
251
auto vDockWidget = focusWindow->property (FocusedDockWidgetProperty);
261
252
if (!vDockWidget.isValid ())
262
253
{
Original file line number Diff line number Diff line change @@ -530,12 +530,16 @@ CDockManager::CDockManager(QWidget *parent) :
530
530
window ()->installEventFilter (this );
531
531
532
532
#if defined(Q_OS_UNIX) && !defined(Q_OS_MACOS)
533
- connect (qApp, &QApplication::focusWindowChanged, [](QWindow* focusWindow)
533
+ connect (qApp, &QApplication::focusWindowChanged, [this ](QWindow* focusWindow)
534
534
{
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)
538
536
{
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
539
543
focusWindow->raise ();
540
544
}
541
545
});
You can’t perform that action at this time.
0 commit comments