From 70c6f0d1f91f93f16e272ca3a77da72a698ab608 Mon Sep 17 00:00:00 2001 From: paul Date: Fri, 28 Sep 2007 03:35:21 +0000 Subject: [PATCH] gtk2: dont send size message to LCL if visibility changed git-svn-id: trunk@12206 - --- lcl/interfaces/gtk/gtkcallback.inc | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/lcl/interfaces/gtk/gtkcallback.inc b/lcl/interfaces/gtk/gtkcallback.inc index fbf71acd82..d4436c9fa5 100644 --- a/lcl/interfaces/gtk/gtkcallback.inc +++ b/lcl/interfaces/gtk/gtkcallback.inc @@ -1156,8 +1156,12 @@ begin // if iconified in changed then OnIconify... - if GTK_WIDGET_REALIZED(Widget) then begin - if TObject(Data) is TCustomForm then begin + if GTK_WIDGET_REALIZED(Widget) then + begin + if (GDK_WINDOW_STATE_WITHDRAWN and state^.changed_mask) = 1 then // visibility changed - this is another message block + exit; + if TObject(Data) is TCustomForm then + begin TheForm := TCustomForm(Data); //DebugLn(['GTKWindowStateEventCB ',DbgSName(TheForm),' new_window_state=',state^.new_window_state,' changed_mask=',state^.changed_mask]); if TheForm.Parent = nil then begin @@ -1170,7 +1174,8 @@ begin GtkHeight:=Widget^.Allocation.Height; if GtkHeight<0 then GtkHeight:=0; //debugln('GTKWindowStateEventCB ',DbgSName(TObject(Data)),' ',dbgs(state^.new_window_state),' ',WidgetFlagsToString(Widget)); - if ((GDK_WINDOW_STATE_ICONIFIED and state^.new_window_state)>0) then begin + if ((GDK_WINDOW_STATE_ICONIFIED and state^.new_window_state)>0) then + begin {$IFDEF HasX} NetAtom := gdk_atom_intern('_NET_WM_DESKTOP', True); if NetAtom > 0 then begin