[gtk+] Don't reenter gdk_window_process_updates_internal



commit 130a7743e39985731dd712b3aa94105e0977f510
Author: Alexander Larsson <alexl redhat com>
Date:   Mon Sep 14 13:24:55 2009 +0200

    Don't reenter gdk_window_process_updates_internal
    
    Its not correct for recurse gdk_window_process_updates_internal, as
    the outer instance will overdraw the inner. So, protect against
    gdk_window_process_updates() being called while in an expose
    handler.
    
    This shouldn't be a repaint problem, as eventually the idle handler
    will cause the updates to be processed.

 gdk/gdkwindow.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/gdk/gdkwindow.c b/gdk/gdkwindow.c
index 3560001..c61b643 100644
--- a/gdk/gdkwindow.c
+++ b/gdk/gdkwindow.c
@@ -5278,7 +5278,11 @@ gdk_window_process_updates (GdkWindow *window,
   if ((impl_window->update_area ||
        impl_window->outstanding_moves) &&
       !impl_window->update_freeze_count &&
-      !gdk_window_is_toplevel_frozen (window))
+      !gdk_window_is_toplevel_frozen (window) &&
+
+      /* Don't recurse into process_updates_internal, we'll
+       * do the update later when idle instead. */
+      impl_window->implicit_paint == NULL)
     {
       gdk_window_process_updates_internal ((GdkWindow *)impl_window);
       gdk_window_remove_update_window ((GdkWindow *)impl_window);



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