Change to ensure that modal widgets are always on top of floating widgets
This commit is contained in:
@@ -45,6 +45,7 @@
|
||||
#include <QSettings>
|
||||
#include <QMenu>
|
||||
#include <QApplication>
|
||||
#include <QWindow>
|
||||
|
||||
#include "FloatingDockContainer.h"
|
||||
#include "DockOverlay.h"
|
||||
@@ -500,6 +501,16 @@ CDockManager::CDockManager(QWidget *parent) :
|
||||
|
||||
#ifdef Q_OS_LINUX
|
||||
window()->installEventFilter(this);
|
||||
|
||||
connect(qApp, &QApplication::focusWindowChanged, [](QWindow* focusWindow)
|
||||
{
|
||||
// bring modal dialogs to foreground to ensure that they are in front of any
|
||||
// floating dock widget
|
||||
if (focusWindow && focusWindow->isModal())
|
||||
{
|
||||
focusWindow->raise();
|
||||
}
|
||||
});
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user