mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-23 17:52:16 +02:00
Gtk2: fixed asserts from gtk2 lib when using gtk_window_set_keep_above() but our form is reparented to some other control (eg. TPanel).
git-svn-id: trunk@27288 -
This commit is contained in:
parent
cf350c8d33
commit
1a283e877f
@ -493,8 +493,9 @@ begin
|
||||
exit;
|
||||
if (csDesigning in AForm.ComponentState) then
|
||||
exit;
|
||||
gtk_window_set_keep_above(PGtkWindow(AForm.Handle),
|
||||
GBoolean(AFormStyle in fsAllStayOnTop));
|
||||
if GTK_IS_WINDOW(PGtkWindow(AForm.Handle)) then
|
||||
gtk_window_set_keep_above(PGtkWindow(AForm.Handle),
|
||||
GBoolean(AFormStyle in fsAllStayOnTop));
|
||||
end;
|
||||
|
||||
{class function TGtk2WSCustomForm.GetDefaultClientRect(
|
||||
@ -545,9 +546,10 @@ begin
|
||||
AForm := TCustomForm(AWinControl);
|
||||
if not (csDesigning in AForm.ComponentState) then
|
||||
begin
|
||||
if AForm.HandleObjectShouldBeVisible then
|
||||
gtk_window_set_keep_above(PGtkWindow(AForm.Handle),
|
||||
GBoolean(AForm.FormStyle in fsAllStayOnTop))
|
||||
if AForm.HandleObjectShouldBeVisible and
|
||||
GTK_IS_WINDOW(PGtkWindow(AForm.Handle)) then
|
||||
gtk_window_set_keep_above(PGtkWindow(AForm.Handle),
|
||||
GBoolean(AForm.FormStyle in fsAllStayOnTop))
|
||||
else
|
||||
if (AForm.FormStyle in fsAllStayOnTop) and
|
||||
not (csDestroying in AWinControl.ComponentState) then
|
||||
|
Loading…
Reference in New Issue
Block a user