From ff4b8a53ac9fca99c1b9cfa60a6d9a90701a42d9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=BDeljan=20Rikalo?= Date: Thu, 3 Oct 2024 14:01:46 +0200 Subject: [PATCH] Qt5, Qt6: better handling of modal windows for gtk based window managers (cinnamon, metacity, xfwm4). --- lcl/interfaces/qt5/qtwsforms.pp | 5 ++--- lcl/interfaces/qt6/qtwsforms.pp | 4 ++-- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/lcl/interfaces/qt5/qtwsforms.pp b/lcl/interfaces/qt5/qtwsforms.pp index 08cbd64f04..678f932e63 100644 --- a/lcl/interfaces/qt5/qtwsforms.pp +++ b/lcl/interfaces/qt5/qtwsforms.pp @@ -515,9 +515,8 @@ begin {$endif} {$ifdef HASX11} - if ((QtWidgetSet.WindowManagerName = 'kwin') and IsOldKDEInstallation) or - (QtWidgetSet.WindowManagerName = 'xfwm4') or - (QtWidgetSet.WindowManagerName = 'metacity') or IsWayland then + if ((QtWidgetSet.WindowManagerName <> 'plasma') and (QtWidgetSet.WindowManagerName <> 'kwin')) + or IsWayland then begin W := nil; ActiveWin := GetActiveWindow; diff --git a/lcl/interfaces/qt6/qtwsforms.pp b/lcl/interfaces/qt6/qtwsforms.pp index e1af7e2fac..af66ca30f8 100644 --- a/lcl/interfaces/qt6/qtwsforms.pp +++ b/lcl/interfaces/qt6/qtwsforms.pp @@ -512,8 +512,8 @@ begin {$endif} {$ifdef HASX11} - if (QtWidgetSet.WindowManagerName = 'xfwm4') or - (QtWidgetSet.WindowManagerName = 'metacity') or IsWayland then + if ((QtWidgetSet.WindowManagerName <> 'plasma') and (QtWidgetSet.WindowManagerName <> 'kwin')) + or IsWayland then begin W := nil; ActiveWin := GetActiveWindow;