[gtk+/client-side-windows: 146/284] Only send map events for toplevels



commit c3637ab20f9575b246f70bea00aaddfa6f710e2f
Author: Richard Hult <richard imendio com>
Date:   Fri Jan 16 20:12:58 2009 +0100

    Only send map events for toplevels
---
 gdk/quartz/gdkwindow-quartz.c |   19 ++-----------------
 1 files changed, 2 insertions(+), 17 deletions(-)

diff --git a/gdk/quartz/gdkwindow-quartz.c b/gdk/quartz/gdkwindow-quartz.c
index 08a30af..b21d381 100644
--- a/gdk/quartz/gdkwindow-quartz.c
+++ b/gdk/quartz/gdkwindow-quartz.c
@@ -1048,20 +1048,6 @@ _gdk_windowing_window_destroy_foreign (GdkWindow *window)
   /* Foreign windows aren't supported in OSX. */
 }
 
-static gboolean
-all_parents_shown (GdkWindowObject *private)
-{
-  while (GDK_WINDOW_IS_MAPPED (private))
-    {
-      if (private->parent)
-	private = (GdkWindowObject *)private->parent;
-      else
-	return TRUE;
-    }
-
-  return FALSE;
-}
-
 /* FIXME: This might be possible to simplify with client-side windows. */
 static void
 gdk_window_quartz_show (GdkWindow *window)
@@ -1086,6 +1072,8 @@ gdk_window_quartz_show (GdkWindow *window)
 
       [(GdkQuartzWindow*)impl->toplevel showAndMakeKey:make_key];
       clear_toplevel_order ();
+
+      _gdk_quartz_events_send_map_events (window);
     }
   else
     {
@@ -1094,9 +1082,6 @@ gdk_window_quartz_show (GdkWindow *window)
 
   [impl->view setNeedsDisplay:YES];
 
-  if (all_parents_shown (private->parent))
-    _gdk_quartz_events_send_map_events (window);
-
   gdk_synthesize_window_state (window, GDK_WINDOW_STATE_WITHDRAWN, 0);
 
   if (private->state & GDK_WINDOW_STATE_MAXIMIZED)



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]