]> Pileus Git - ~andy/gtk/commitdiff
Make gdk_windowing_window_destroy a GdkWindowImpl method
authorAlexander Larsson <alexl@redhat.com>
Mon, 15 Dec 2008 14:04:44 +0000 (15:04 +0100)
committerAlexander Larsson <alex@localhost.localdomain>
Thu, 2 Apr 2009 08:15:15 +0000 (10:15 +0200)
gdk/gdkinternals.h
gdk/gdkoffscreenwindow.c
gdk/gdkwindow.c
gdk/gdkwindowimpl.h
gdk/x11/gdkwindow-x11.c

index ecc9b097eea5b36486e06f0bca073e99a020a952..322825f0a2f2c3b8becc39399b21d8386d8af085 100644 (file)
@@ -360,23 +360,6 @@ gint _gdk_windowing_get_bits_for_depth (GdkDisplay *display,
 #define GDK_WINDOW_IS_MAPPED(window) ((((GdkWindowObject*)window)->state & GDK_WINDOW_STATE_WITHDRAWN) == 0)
 
 
-/* Called to do the windowing system specific part of gdk_window_destroy(),
- *
- * window: The window being destroyed
- * recursing: If TRUE, then this is being called because a parent
- *            was destroyed. This generally means that the call to the windowing system
- *            to destroy the window can be omitted, since it will be destroyed as a result
- *            of the parent being destroyed. Unless @foreign_destroy
- *            
- * foreign_destroy: If TRUE, the window or a parent was destroyed by some external 
- *            agency. The window has already been destroyed and no windowing
- *            system calls should be made. (This may never happen for some
- *            windowing systems.)
- */
-void _gdk_windowing_window_destroy (GdkWindow *window,
-                                   gboolean   recursing,
-                                   gboolean   foreign_destroy);
-
 /* Called when gdk_window_destroy() is called on a foreign window
  * or an ancestor of the foreign window. It should generally reparent
  * the window out of it's current heirarchy, hide it, and then
@@ -546,8 +529,6 @@ void       _gdk_offscreen_window_new                 (GdkWindow     *window,
                                                      GdkVisual     *visual,
                                                      GdkWindowAttr *attributes,
                                                      gint           attributes_mask);
-void       _gdk_offscreen_window_destroy             (GdkWindow     *window,
-                                                      gboolean       recursing);
 
 
 /************************************
index 03b52a6b0b4fa5a188977ea54ec9aa86fd78366e..9b17bf87b54b4e4f462898925ab339c24f2e6e93 100644 (file)
@@ -103,9 +103,10 @@ gdk_offscreen_window_init (GdkOffscreenWindow *window)
 {
 }
 
-void
-_gdk_offscreen_window_destroy (GdkWindow *window,
-                               gboolean   recursing)
+static void
+gdk_offscreen_window_destroy (GdkWindow *window,
+                             gboolean   recursing,
+                             gboolean   foreign_destroy)
 {
   GdkWindowObject *private = GDK_WINDOW_OBJECT (window);
   GdkOffscreenWindow *offscreen;
@@ -1184,6 +1185,7 @@ gdk_offscreen_window_impl_iface_init (GdkWindowImplIface *iface)
   iface->queue_antiexpose = gdk_offscreen_window_queue_antiexpose;
   iface->queue_translation = gdk_offscreen_window_queue_translation;
   iface->get_origin = gdk_offscreen_window_get_origin;
+  iface->destroy = gdk_offscreen_window_destroy;
 }
 
 #define __GDK_OFFSCREEN_WINDOW_C__
index 8bcdd3739cd2cf5a118598a90c2b98f23920b797..dd8cdfce7e2feb0819e49f5dcb27937c18a454da 100644 (file)
@@ -1261,10 +1261,7 @@ _gdk_window_destroy_hierarchy (GdkWindow *window,
 
          if (gdk_window_has_impl (private))
            {
-             if (gdk_window_is_offscreen (private))
-               _gdk_offscreen_window_destroy (window, recursing);
-             else
-               _gdk_windowing_window_destroy (window, recursing, foreign_destroy);
+             GDK_WINDOW_IMPL_GET_IFACE (private->impl)->destroy (window, recursing, foreign_destroy);
            }
          else
            {
index ad1f6206e3d7a59fdf624875be03c7f0d3d0f0ac..eff05b9b7521b4faf15e0aa4cbc09cb75f5b127c 100644 (file)
@@ -112,7 +112,23 @@ struct _GdkWindowImplIface
                                         GdkRegion       *area,
                                         gint            dx,
                                         gint            dy);
-  
+
+/* Called to do the windowing system specific part of gdk_window_destroy(),
+ *
+ * window: The window being destroyed
+ * recursing: If TRUE, then this is being called because a parent
+ *            was destroyed. This generally means that the call to the windowing system
+ *            to destroy the window can be omitted, since it will be destroyed as a result
+ *            of the parent being destroyed. Unless @foreign_destroy
+ *            
+ * foreign_destroy: If TRUE, the window or a parent was destroyed by some external 
+ *            agency. The window has already been destroyed and no windowing
+ *            system calls should be made. (This may never happen for some
+ *            windowing systems.)
+ */
+  void         (* destroy)              (GdkWindow       *window,
+                                        gboolean         recursing,
+                                        gboolean         foreign_destroy);
 };
 
 /* Interface Functions */
index 3b6d56300cfd8679116202f509d5970949484a99..6a51cf713723a4de98dcbe99713839215e663fd0 100644 (file)
@@ -1001,10 +1001,10 @@ gdk_toplevel_x11_free_contents (GdkDisplay *display,
 #endif
 }
 
-void
-_gdk_windowing_window_destroy (GdkWindow *window,
-                              gboolean   recursing,
-                              gboolean   foreign_destroy)
+static void
+_gdk_x11_window_destroy (GdkWindow *window,
+                        gboolean   recursing,
+                        gboolean   foreign_destroy)
 {
   GdkWindowObject *private = (GdkWindowObject *)window;
   GdkToplevelX11 *toplevel;
@@ -5926,6 +5926,7 @@ gdk_window_impl_iface_init (GdkWindowImplIface *iface)
   iface->set_static_gravities = gdk_window_x11_set_static_gravities;
   iface->queue_antiexpose = _gdk_x11_window_queue_antiexpose;
   iface->queue_translation = _gdk_x11_window_queue_translation;
+  iface->destroy = _gdk_x11_window_destroy;
 }
 
 #define __GDK_WINDOW_X11_C__