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:
zeljko 2010-09-10 09:50:05 +00:00
parent cf350c8d33
commit 1a283e877f

View File

@ -493,6 +493,7 @@ begin
exit;
if (csDesigning in AForm.ComponentState) then
exit;
if GTK_IS_WINDOW(PGtkWindow(AForm.Handle)) then
gtk_window_set_keep_above(PGtkWindow(AForm.Handle),
GBoolean(AFormStyle in fsAllStayOnTop));
end;
@ -545,7 +546,8 @@ begin
AForm := TCustomForm(AWinControl);
if not (csDesigning in AForm.ComponentState) then
begin
if AForm.HandleObjectShouldBeVisible then
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