Qt: better handling of forms with borderstyle = bsNone. issue #26018, related to issue #28863

git-svn-id: trunk@50139 -
This commit is contained in:
zeljko 2015-10-22 12:55:27 +00:00
parent f771469dfe
commit eb6cd6b9d0

View File

@ -556,21 +556,18 @@ begin
if AWinControl.HandleObjectShouldBeVisible and if AWinControl.HandleObjectShouldBeVisible and
not (TCustomForm(AWinControl).FormStyle in fsAllStayOnTop) and not (TCustomForm(AWinControl).FormStyle in fsAllStayOnTop) and
not (fsModal in TCustomForm(AWinControl).FormState) and not (fsModal in TCustomForm(AWinControl).FormState) and
(TCustomForm(AWinControl).FormStyle <> fsMDIChild) and
(TCustomForm(AWinControl).PopupMode = pmAuto) and (TCustomForm(AWinControl).PopupMode = pmAuto) and
(TCustomForm(AWinControl).BorderStyle = bsNone) and (TCustomForm(AWinControl).BorderStyle = bsNone) and
(TCustomForm(AWinControl).PopupParent = nil) then (TCustomForm(AWinControl).PopupParent = nil) then
begin begin
W := QApplication_activeWindow; W := QApplication_activeWindow;
if (W <> nil) and not QWidget_isModal(W) then Flags := Widget.windowFlags;
begin if W <> nil then
Flags := QWidget_windowFlags(W); Widget.setParent(W)
if (Flags and QtWindowStaysOnTopHint <> QtWindowStaysOnTopHint) and else
GetAlwaysOnTopX11(W) then Widget.setParent(QApplication_desktop);
begin Widget.setWindowFlags(Flags or QtTool);
Flags := Widget.windowFlags;
Widget.setWindowFlags(Flags or QtWindowStaysOnTopHint);
end;
end;
end; end;
{$ENDIF} {$ENDIF}
end; end;