[gtk+/client-side-windows: 180/284] Remove invalidate_maybe_recurse and process_updates from the paintable interface



commit 1a47356485055584dac4c07106c0eae90ef3f4cc
Author: Richard Hult <richard imendio com>
Date:   Mon Jan 26 19:29:26 2009 +0100

    Remove invalidate_maybe_recurse and process_updates from the paintable interface
    
    Replace them with two new functions
    _gdk_windowing_{before,after}_process_all_updates() that are called
    around the guts of gdk_window_process_all_updates(). Add empty ones
    for X11 (nothing more needed), quartz ones will be implemented next.
---
 gdk/gdkinternals.h      |    9 ++-------
 gdk/gdkwindow.c         |   32 ++++++++++++--------------------
 gdk/x11/gdkwindow-x11.c |   10 ++++++++++
 3 files changed, 24 insertions(+), 27 deletions(-)

diff --git a/gdk/gdkinternals.h b/gdk/gdkinternals.h
index a682d59..781a799 100644
--- a/gdk/gdkinternals.h
+++ b/gdk/gdkinternals.h
@@ -366,6 +366,8 @@ void _gdk_windowing_got_event                (GdkDisplay       *display,
 
 void _gdk_windowing_window_process_updates_recurse (GdkWindow *window,
                                                     GdkRegion *expose_region);
+void _gdk_windowing_before_process_all_updates     (void);
+void _gdk_windowing_after_process_all_updates      (void);
 
 /* Return the number of bits-per-pixel for images of the specified depth. */
 gint _gdk_windowing_get_bits_for_depth (GdkDisplay *display,
@@ -404,13 +406,6 @@ struct _GdkPaintableIface
                                      GdkWindow       *window,
                                      const GdkRegion *region);
   void (* end_paint)                (GdkPaintable    *paintable);
-
-  void (* invalidate_maybe_recurse) (GdkPaintable    *paintable,
-				     const GdkRegion *region,
-				     gboolean       (*child_func) (GdkWindow *, gpointer),
-				     gpointer         user_data);
-  void (* process_updates)          (GdkPaintable    *paintable,
-				     gboolean         update_children);
 };
 
 GType _gdk_paintable_get_type (void) G_GNUC_CONST;
diff --git a/gdk/gdkwindow.c b/gdk/gdkwindow.c
index 8e75c0a..6e96be9 100644
--- a/gdk/gdkwindow.c
+++ b/gdk/gdkwindow.c
@@ -4525,6 +4525,12 @@ gdk_window_process_all_updates (void)
 {
   GSList *old_update_windows = update_windows;
   GSList *tmp_list = update_windows;
+  static gboolean in_process_all_updates = FALSE;
+
+  if (in_process_all_updates)
+    return;
+
+  in_process_all_updates = TRUE;
 
   if (update_idle)
     g_source_remove (update_idle);
@@ -4532,6 +4538,8 @@ gdk_window_process_all_updates (void)
   update_windows = NULL;
   update_idle = 0;
 
+  _gdk_windowing_before_process_all_updates ();
+
   g_slist_foreach (old_update_windows, (GFunc)g_object_ref, NULL);
   
   while (tmp_list)
@@ -4554,6 +4562,10 @@ gdk_window_process_all_updates (void)
   g_slist_free (old_update_windows);
 
   flush_all_displays ();
+
+  _gdk_windowing_after_process_all_updates ();
+
+  in_process_all_updates = FALSE;
 }
 
 /**
@@ -4580,16 +4592,6 @@ gdk_window_process_updates (GdkWindow *window,
 
   g_return_if_fail (GDK_IS_WINDOW (window));
 
-  if (GDK_IS_PAINTABLE (private->impl))
-    {
-      GdkPaintableIface *iface = GDK_PAINTABLE_GET_IFACE (private->impl);
-
-      if (iface->process_updates)
-        iface->process_updates ((GdkPaintable*)private->impl, update_children);
-
-      return;
-    }
-
   impl_window = gdk_window_get_impl_window (private);
   if ((impl_window->update_area ||
        impl_window->outstanding_moves) &&
@@ -4723,16 +4725,6 @@ gdk_window_invalidate_maybe_recurse (GdkWindow       *window,
   if (private->input_only || !GDK_WINDOW_IS_MAPPED (window))
     return;
 
-  if (GDK_IS_PAINTABLE (private->impl))
-    {
-      GdkPaintableIface *iface = GDK_PAINTABLE_GET_IFACE (private->impl);
-
-      if (iface->invalidate_maybe_recurse)
-        iface->invalidate_maybe_recurse ((GdkPaintable*)private->impl, 
-                                         region, child_func, user_data);
-      return;
-    }
-
   visible_region = gdk_drawable_get_visible_region (window);
   gdk_region_intersect (visible_region, region);
 
diff --git a/gdk/x11/gdkwindow-x11.c b/gdk/x11/gdkwindow-x11.c
index efb8a2c..87e2dcc 100644
--- a/gdk/x11/gdkwindow-x11.c
+++ b/gdk/x11/gdkwindow-x11.c
@@ -5519,6 +5519,16 @@ _gdk_windowing_window_process_updates_recurse (GdkWindow *window,
   _gdk_window_process_updates_recurse (window, expose_region);
 }
 
+void
+_gdk_windowing_after_process_all_updates (void)
+{
+}
+
+void
+_gdk_windowing_after_process_all_updates (void)
+{
+}
+
 static void
 gdk_window_impl_iface_init (GdkWindowImplIface *iface)
 {



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