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.
This commit is contained in:
Richard Hult
2009-01-26 19:29:26 +01:00
committed by Alexander Larsson
parent 1ee03b35d0
commit 1a47356485
3 changed files with 24 additions and 27 deletions

View File

@ -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;

View File

@ -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);

View File

@ -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)
{