mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-05-03 11:23:40 +02:00
Gtk2: fixed popupparent when mode is pmExplicit. issue #25589
git-svn-id: trunk@48693 -
This commit is contained in:
parent
328668b5b6
commit
890bf2475b
@ -775,6 +775,16 @@ begin
|
||||
gtk_window_set_keep_above(GtkWindow, True);
|
||||
end;
|
||||
end;
|
||||
|
||||
if AWinControl.HandleObjectShouldBeVisible and
|
||||
not (csDesigning in AForm.ComponentState) and
|
||||
not (AForm.FormStyle in fsAllStayOnTop) and
|
||||
not (fsModal in AForm.FormState) and
|
||||
(AForm.PopupMode = pmExplicit) and
|
||||
(AForm.PopupParent = nil) then
|
||||
begin
|
||||
SetPopupParent(AForm, AForm.PopupMode, AForm.PopupParent);
|
||||
end;
|
||||
{$ENDIF}
|
||||
|
||||
Gtk2WidgetSet.SetVisible(AWinControl, AForm.HandleObjectShouldBeVisible);
|
||||
@ -846,7 +856,11 @@ begin
|
||||
pmAuto:
|
||||
PopupParent := Screen.ActiveForm;
|
||||
pmExplicit:
|
||||
begin
|
||||
PopupParent := APopupParent;
|
||||
if PopupParent = nil then
|
||||
PopupParent := Application.MainForm;
|
||||
end;
|
||||
end;
|
||||
if PopupParent <> nil then
|
||||
gtk_window_set_transient_for({%H-}PGtkWindow(ACustomForm.Handle), {%H-}PGtkWindow(PopupParent.Handle))
|
||||
|
Loading…
Reference in New Issue
Block a user