mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-26 09:09:10 +02:00
Qt5: fixed bug with modal windows under gnome shell window manager.issue #35782
git-svn-id: trunk@61490 -
This commit is contained in:
parent
7ffa3b81af
commit
8d5d46016b
@ -57,7 +57,7 @@ begin
|
||||
FLastMinimizeEvent := 0;
|
||||
FWindowManagerName := LowerCase(GetWindowManager);
|
||||
// metacity wm forks. marco = mint mate wm, gnome shell = gnome 3 wm
|
||||
if (FWindowManagerName = 'marco') or (FWindowManagerName = 'gnome shell') or
|
||||
if (FWindowManagerName = 'marco') or // issue #35782 (FWindowManagerName = 'gnome shell') or
|
||||
(UTF8Pos('mutter', FWindowManagerName) > 0) then
|
||||
FWindowManagerName := 'metacity';
|
||||
{$ENDIF}
|
||||
|
@ -423,6 +423,7 @@ var
|
||||
W: QWidgetH;
|
||||
{$ENDIF}
|
||||
Flags: Cardinal;
|
||||
AModalWindowFlag: QtWindowFlags;
|
||||
|
||||
function ShowNonModalOverModal: Boolean;
|
||||
var
|
||||
@ -528,7 +529,15 @@ begin
|
||||
if (TCustomForm(AWinControl).BorderStyle in [bsSizeable, bsSizeToolWin]) then
|
||||
Flags := Flags or QtWindowMaximizeButtonHint;
|
||||
{$endif}
|
||||
QWidget_setWindowFlags(Widget.Widget, QtDialog or
|
||||
AModalWindowFlag := QtDialog;
|
||||
{$IFDEF HASX11}
|
||||
//do not translate those strings. issue #35782.
|
||||
//if this fails for ubuntus < 18.04 then we must parse /etc/os-release
|
||||
//for exact ubuntu version.
|
||||
if (LowerCase(GetWindowManager) = 'gnome shell') then
|
||||
AModalWindowFlag := QtWindow;
|
||||
{$ENDIF}
|
||||
QWidget_setWindowFlags(Widget.Widget, AModalWindowFlag or
|
||||
{$ifdef darwin}Flags or {$endif}
|
||||
GetQtBorderIcons(TCustomForm(AWinControl).BorderStyle,
|
||||
TCustomForm(AWinControl).BorderIcons));
|
||||
|
Loading…
Reference in New Issue
Block a user