mirror of
https://github.com/githubuser0xFFFF/Qt-Advanced-Docking-System.git
synced 2025-01-24 13:32:06 +08:00
Merge branch 'linux_modal_dialog_fix'
This commit is contained in:
commit
82c98a3f91
@ -264,7 +264,7 @@ void CDockFocusController::onFocusWindowChanged(QWindow *focusWindow)
|
|||||||
//===========================================================================
|
//===========================================================================
|
||||||
void CDockFocusController::onApplicationFocusChanged(QWidget* focusedOld, QWidget* focusedNow)
|
void CDockFocusController::onApplicationFocusChanged(QWidget* focusedOld, QWidget* focusedNow)
|
||||||
{
|
{
|
||||||
Q_UNUSED(focusedOld);
|
Q_UNUSED(focusedOld);
|
||||||
|
|
||||||
if (d->DockManager->isRestoringState())
|
if (d->DockManager->isRestoringState())
|
||||||
{
|
{
|
||||||
|
@ -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
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -515,6 +515,13 @@ void FloatingDockContainerPrivate::updateDropOverlays(const QPoint &GlobalPos)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef Q_OS_LINUX
|
||||||
|
if (qApp->activeModalWidget())
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
auto Containers = DockManager->dockContainers();
|
auto Containers = DockManager->dockContainers();
|
||||||
CDockContainerWidget *TopContainer = nullptr;
|
CDockContainerWidget *TopContainer = nullptr;
|
||||||
for (auto ContainerWidget : Containers)
|
for (auto ContainerWidget : Containers)
|
||||||
|
Loading…
Reference in New Issue
Block a user