lcl: gtk2: fix PopupMode/PopupParent for non-modal windows. Issue #29247

git-svn-id: trunk@51022 -
This commit is contained in:
ondrej 2015-12-24 13:35:54 +00:00
parent 3cab480c11
commit 1f8d55f804

View File

@ -779,10 +779,16 @@ begin
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
(((AForm.PopupMode = pmAuto) and
(Screen.ActiveCustomForm <> nil)) or
((AForm.PopupMode = pmExplicit) and
(AForm.PopupParent <> nil)))
then
begin
SetPopupParent(AForm, AForm.PopupMode, AForm.PopupParent);
if (AForm.PopupMode = pmAuto) then
SetPopupParent(AForm, AForm.PopupMode, Screen.ActiveCustomForm)
else
SetPopupParent(AForm, AForm.PopupMode, AForm.PopupParent);
end;
{$ENDIF}