mirror of
https://github.com/githubuser0xFFFF/Qt-Advanced-Docking-System.git
synced 2024-11-15 21:25:44 +08:00
Change to ensure that modal widgets are always on top of floating widgets
This commit is contained in:
parent
d27783e2f1
commit
c11a496278
@ -45,6 +45,7 @@
|
|||||||
#include <QSettings>
|
#include <QSettings>
|
||||||
#include <QMenu>
|
#include <QMenu>
|
||||||
#include <QApplication>
|
#include <QApplication>
|
||||||
|
#include <QWindow>
|
||||||
|
|
||||||
#include "FloatingDockContainer.h"
|
#include "FloatingDockContainer.h"
|
||||||
#include "DockOverlay.h"
|
#include "DockOverlay.h"
|
||||||
@ -500,6 +501,16 @@ CDockManager::CDockManager(QWidget *parent) :
|
|||||||
|
|
||||||
#ifdef Q_OS_LINUX
|
#ifdef Q_OS_LINUX
|
||||||
window()->installEventFilter(this);
|
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
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user