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;