File tree Expand file tree Collapse file tree 1 file changed +18
-2
lines changed
Expand file tree Collapse file tree 1 file changed +18
-2
lines changed Original file line number Diff line number Diff line change 4141#include < QVariant>
4242#include < QDebug>
4343#include < QFile>
44+ #include < QDialog>
4445#include < QAction>
4546#include < QXmlStreamWriter>
4647#include < QSettings>
@@ -537,8 +538,23 @@ CDockManager::CDockManager(QWidget *parent) :
537538 return ;
538539 }
539540
540- // bring the main application window that hosts the dock manager and all floating
541- // widgets in front of any other application
541+ auto widget = QWidget::find (focusWindow->winId ());
542+ if (!widget)
543+ {
544+ return ;
545+ }
546+
547+ // If the user clicks the main window or drags a floating widget or works with a
548+ // dialog, then raise the main window, all floating widgets and the focus window
549+ // itself to bring it into foregreound of any other application
550+ bool raise = qobject_cast<QMainWindow*>(widget)
551+ || qobject_cast<QDialog*>(widget)
552+ || qobject_cast<ads::CFloatingDockContainer*>(widget);
553+ if (!raise)
554+ {
555+ return ;
556+ }
557+
542558 this ->raise ();
543559 for (auto FloatingWidget : d->FloatingWidgets )
544560 {
You can’t perform that action at this time.
0 commit comments