[PATCH] Workaround for GTK Redraw Problems

Thomas White taw27 at cam.ac.uk
Mon Nov 17 22:24:02 CET 2008


I've been sinking my teeth into bug number 1946 this weekend, which
makes many GTK applications unusable in the current Testing image:
https://docs.openmoko.org/trac/ticket/1946

I traced the problem to a mechanism for freezing the redraw of a window
and all its descendants.  This patch is an ugly workaround which fixes
(or rather, steam-rollers over) the problem by disabling the checks for
this freeze condition in the redraw management routines.  There may be
some adverse consequences associated with this, but it's better than
the state GTK is in at the moment.

Over the course of this week, I hope to dig deeper and fix the problem
at its root cause.

Signed-off-by: Thomas White <taw27 at cam.ac.uk>
---
 .../gtk+-2.12.11/disable-toplevel-freeze.patch     |   33 ++++++++++++++++++++
 packages/gtk+/gtk+_2.12.11.bb                      |    3 +-
 2 files changed, 35 insertions(+), 1 deletions(-)
 create mode 100644 packages/gtk+/gtk+-2.12.11/disable-toplevel-freeze.patch

diff --git a/packages/gtk+/gtk+-2.12.11/disable-toplevel-freeze.patch b/packages/gtk+/gtk+-2.12.11/disable-toplevel-freeze.patch
new file mode 100644
index 0000000..6720bf7
--- /dev/null
+++ b/packages/gtk+/gtk+-2.12.11/disable-toplevel-freeze.patch
@@ -0,0 +1,33 @@
+diff -urN gtk-2.12.11-clean/gdk/gdkwindow.c gtk-2.12.11-unfrozen/gdk/gdkwindow.c
+--- gtk-2.12.11-clean/gdk/gdkwindow.c	2008-11-17 20:18:12.000000000 +0000
++++ gtk-2.12.11-unfrozen/gdk/gdkwindow.c	2008-11-17 20:23:59.000000000 +0000
+@@ -2304,8 +2304,7 @@
+ gdk_window_schedule_update (GdkWindow *window)
+ {
+   if (window &&
+-      (GDK_WINDOW_OBJECT (window)->update_freeze_count ||
+-       gdk_window_is_toplevel_frozen (window)))
++      (GDK_WINDOW_OBJECT (window)->update_freeze_count ))
+     return;
+ 
+   if (!update_idle)
+@@ -2437,8 +2436,7 @@
+       
+       if (!GDK_WINDOW_DESTROYED (tmp_list->data))
+         {
+-	  if (private->update_freeze_count ||
+-	      gdk_window_is_toplevel_frozen (tmp_list->data))
++	  if (private->update_freeze_count)
+ 	    update_windows = g_slist_prepend (update_windows, private);
+ 	  else
+ 	    gdk_window_process_updates_internal (tmp_list->data);
+@@ -2488,8 +2486,7 @@
+     }
+   
+   if (private->update_area &&
+-      !private->update_freeze_count &&
+-      !gdk_window_is_toplevel_frozen (window))
++      !private->update_freeze_count)
+     {      
+       gdk_window_process_updates_internal (window);
+       update_windows = g_slist_remove (update_windows, window);
diff --git a/packages/gtk+/gtk+_2.12.11.bb b/packages/gtk+/gtk+_2.12.11.bb
index d246eb8..f40b246 100644
--- a/packages/gtk+/gtk+_2.12.11.bb
+++ b/packages/gtk+/gtk+_2.12.11.bb
@@ -1,6 +1,6 @@
 require gtk+.inc
 
-PR = "r4"
+PR = "r5"
 
 DEPENDS += "cairo"
 
@@ -8,6 +8,7 @@ DEPENDS += "cairo"
 DEFAULT_PREFERENCE = "-1" 
 
 SRC_URI = "http://download.gnome.org/sources/gtk+/2.12/gtk+-${PV}.tar.bz2 \
+           file://disable-toplevel-freeze.patch;patch=1 \
            file://xsettings.patch;patch=1 \
            file://run-iconcache.patch;patch=1 \
            file://hardcoded_libtool.patch;patch=1 \
-- 
1.5.6.3



More information about the devel mailing list