From 664d02edd449bde1010270fc325bcad660a43299 Mon Sep 17 00:00:00 2001 From: mborgerson Date: Thu, 5 Feb 2026 21:41:12 -0700 Subject: [PATCH] Raise dialogs only if they are modal (#808) --- src/DockManager.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/DockManager.cpp b/src/DockManager.cpp index 9159866..bc1326b 100644 --- a/src/DockManager.cpp +++ b/src/DockManager.cpp @@ -545,11 +545,14 @@ CDockManager::CDockManager(QWidget *parent) : } // If the user clicks the main window or drags a floating widget or works with a - // dialog, then raise the main window, all floating widgets and the focus window - // itself to bring it into foregreound of any other application + // modal dialog, then raise the main window, all floating widgets and the focus window + // itself to bring it into foreground of any other application. bool raise = qobject_cast(widget) - || qobject_cast(widget) || qobject_cast(widget); + if (auto dialog = qobject_cast(widget)) + { + raise |= dialog->isModal(); + } if (!raise) { return;