mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-23 09:39:30 +02:00
Qt,Qt5,Qt6: fixed borderless popup over parent form with FormStyle = fsStayOnTop. issue #40440
This commit is contained in:
parent
24e996ddef
commit
2a339f8cb1
@ -7020,6 +7020,9 @@ end;
|
||||
procedure TQtMainWindow.ChangeParent(NewParent: QWidgetH);
|
||||
var
|
||||
Flags: QtWindowFlags;
|
||||
{$IFNDEF MSWINDOWS}
|
||||
Flags2: QtWindowFlags;
|
||||
{$ENDIF}
|
||||
Visible: Boolean;
|
||||
begin
|
||||
if NewParent <> Widget then
|
||||
@ -7027,6 +7030,15 @@ begin
|
||||
Visible := getVisible;
|
||||
Flags := windowFlags;
|
||||
setParent(NewParent);
|
||||
{$IFNDEF MSWINDOWS}
|
||||
//issue #40440
|
||||
if NewParent <> nil then
|
||||
Flags2 := QWidget_windowFlags(NewParent)
|
||||
else
|
||||
Flags2 := 0;
|
||||
if (Flags and QtWindowStaysOnTopHint = 0) and (Flags2 and QtWindowStaysOnTopHint <> 0) then
|
||||
Flags := Flags or QtWindowStaysOnTopHint;
|
||||
{$ENDIF}
|
||||
setWindowFlags(Flags);
|
||||
setVisible(Visible);
|
||||
end;
|
||||
|
@ -7135,6 +7135,9 @@ end;
|
||||
procedure TQtMainWindow.ChangeParent(NewParent: QWidgetH);
|
||||
var
|
||||
Flags: QtWindowFlags;
|
||||
{$IFNDEF MSWINDOWS}
|
||||
Flags2: QtWindowFlags;
|
||||
{$ENDIF}
|
||||
Visible: Boolean;
|
||||
begin
|
||||
if NewParent <> Widget then
|
||||
@ -7142,6 +7145,15 @@ begin
|
||||
Visible := getVisible;
|
||||
Flags := windowFlags;
|
||||
setParent(NewParent);
|
||||
{$IFNDEF MSWINDOWS}
|
||||
//issue #40440
|
||||
if NewParent <> nil then
|
||||
Flags2 := QWidget_windowFlags(NewParent)
|
||||
else
|
||||
Flags2 := 0;
|
||||
if (Flags and QtWindowStaysOnTopHint = 0) and (Flags2 and QtWindowStaysOnTopHint <> 0) then
|
||||
Flags := Flags or QtWindowStaysOnTopHint;
|
||||
{$ENDIF}
|
||||
setWindowFlags(Flags);
|
||||
setVisible(Visible);
|
||||
end;
|
||||
|
@ -7159,6 +7159,9 @@ end;
|
||||
procedure TQtMainWindow.ChangeParent(NewParent: QWidgetH);
|
||||
var
|
||||
Flags: QtWindowFlags;
|
||||
{$IFNDEF MSWINDOWS}
|
||||
Flags2: QtWindowFlags;
|
||||
{$ENDIF}
|
||||
Visible: Boolean;
|
||||
begin
|
||||
if NewParent <> Widget then
|
||||
@ -7166,6 +7169,15 @@ begin
|
||||
Visible := getVisible;
|
||||
Flags := windowFlags;
|
||||
setParent(NewParent);
|
||||
{$IFNDEF MSWINDOWS}
|
||||
//issue #40440
|
||||
if NewParent <> nil then
|
||||
Flags2 := QWidget_windowFlags(NewParent)
|
||||
else
|
||||
Flags2 := 0;
|
||||
if (Flags and QtWindowStaysOnTopHint = 0) and (Flags2 and QtWindowStaysOnTopHint <> 0) then
|
||||
Flags := Flags or QtWindowStaysOnTopHint;
|
||||
{$ENDIF}
|
||||
setWindowFlags(Flags);
|
||||
setVisible(Visible);
|
||||
end;
|
||||
|
Loading…
Reference in New Issue
Block a user