diff --git a/lcl/interfaces/qt/qtwsforms.pp b/lcl/interfaces/qt/qtwsforms.pp index 8906ce6e71..eb9d14473a 100644 --- a/lcl/interfaces/qt/qtwsforms.pp +++ b/lcl/interfaces/qt/qtwsforms.pp @@ -420,7 +420,8 @@ begin {$endif} {$ifdef HASX11} - if (GetWindowManager = 'kwin') and IsOldKDEInstallation then + if ((QtWidgetSet.WindowManagerName = 'kwin') and IsOldKDEInstallation) or + (QtWidgetSet.WindowManagerName = 'xfwm4') then begin W := nil; ActiveWin := GetActiveWindow;