diff --git a/gtk2-bad-drawable-errors.patch b/gtk2-bad-drawable-errors.patch new file mode 100644 index 0000000..ed3b097 --- /dev/null +++ b/gtk2-bad-drawable-errors.patch @@ -0,0 +1,36 @@ +From f96e51db46f2196707c0ea44a46f1d67f9a069d4 Mon Sep 17 00:00:00 2001 +From: Alexander Larsson +Date: Fri, 15 Jan 2010 15:06:12 +0000 +Subject: Avoid drawing implicit paints to destroyed windows + +It may happen that a window gets destroyed during painting, if so +we should not draw the implicit paint double-buffered pixmap to it +as that will cause a BadDrawable X error. + +This fixes bug 600865 +--- +diff --git a/gdk/gdkwindow.c b/gdk/gdkwindow.c +index eeaee78..9e6b14a 100644 +--- a/gdk/gdkwindow.c ++++ b/gdk/gdkwindow.c +@@ -2679,7 +2679,7 @@ gdk_window_flush_implicit_paint (GdkWindow *window) + gdk_region_offset (region, private->abs_x, private->abs_y); + gdk_region_intersect (region, paint->region); + +- if (!gdk_region_empty (region)) ++ if (!GDK_WINDOW_DESTROYED (window) && !gdk_region_empty (region)) + { + /* Remove flushed region from the implicit paint */ + gdk_region_subtract (paint->region, region); +@@ -2712,7 +2712,7 @@ gdk_window_end_implicit_paint (GdkWindow *window) + + private->implicit_paint = NULL; + +- if (!gdk_region_empty (paint->region)) ++ if (!GDK_WINDOW_DESTROYED (window) && !gdk_region_empty (paint->region)) + { + /* Some regions are valid, push these to window now */ + tmp_gc = _gdk_drawable_get_scratch_gc ((GdkDrawable *)window, FALSE); +-- +cgit v0.8.3.1 + diff --git a/gtk2.changes b/gtk2.changes index 4be5a73..a041d19 100644 --- a/gtk2.changes +++ b/gtk2.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Sat Jan 16 11:40:10 UTC 2010 - andrea@opensuse.org + +- Add gtk2-bad-drawable-errors.patch, taken from upstream: + this is needed to fix crashes in various circumstances. + Fix bnc#570941 bgo#600865 + ------------------------------------------------------------------- Tue Jan 12 11:16:10 CET 2010 - vuntz@opensuse.org diff --git a/gtk2.spec b/gtk2.spec index c18f7cf..466949a 100644 --- a/gtk2.spec +++ b/gtk2.spec @@ -43,6 +43,8 @@ Patch22: bugzilla-129753-gtk+-2.8.9-localize-font-style-name.diff Patch23: bugzilla-131498-allow-xim-for-all-languages.patch # PATCH-FIX-UPSTREAM gtk2-bnc130159-bgo319483-async-selection-in-gtk-font-selection.diff bnc130159 bgo319483 federico@novell.com - Load fonts asynchronously in GtkFontSelection to make it appear faster for CJK languages Patch24: gtk2-bnc130159-bgo319483-async-selection-in-gtk-font-selection.diff +# PATCH-FIX-UPSTREAM gtk2-bad-drawable-errors.patch bgo600865 bnc570941 andrea@opensuse.org -- Patch taken from upstream +Patch25: gtk2-bad-drawable-errors.patch # Patches taken from upstream or slated to go upstream. We can expect these to become obsolete # in future releases. # Please don't delete this comment even if this section is empty -- "# empty" should @@ -165,7 +167,9 @@ cp -a %{S:2} . %patch22 -p1 %patch23 -p1 %patch24 -p1 +%patch25 -p1 %patch53 + gnome-patch-translation-update %build