[arch-commits] CVS update of extra/lib/gtk2 (6 files)
Jan de Groot
jgc at archlinux.org
Sat Oct 13 17:55:07 UTC 2007
Date: Saturday, October 13, 2007 @ 13:55:07
Author: jgc
Path: /home/cvs-extra/extra/lib/gtk2
Added: 071_fix_gdk_window_null_crasher.patch (1.1) double-free.patch (1.1)
scale-button-grab.patch (1.1) simple-search-crash.patch (1.1)
swt-tooltips.patch (1.1)
Modified: PKGBUILD (1.100 -> 1.101)
upgpkg: gtk2 2.12.0-2
Add some post-release patches to fix various issues
---------------------------------------+
071_fix_gdk_window_null_crasher.patch | 68 +++++++++++++++++++++++++
PKGBUILD | 23 +++++++-
double-free.patch | 11 ++++
scale-button-grab.patch | 42 ++++++++++++++++
simple-search-crash.patch | 84 ++++++++++++++++++++++++++++++++
swt-tooltips.patch | 13 ++++
6 files changed, 238 insertions(+), 3 deletions(-)
Index: extra/lib/gtk2/071_fix_gdk_window_null_crasher.patch
diff -u /dev/null extra/lib/gtk2/071_fix_gdk_window_null_crasher.patch:1.1
--- /dev/null Sat Oct 13 13:55:06 2007
+++ extra/lib/gtk2/071_fix_gdk_window_null_crasher.patch Sat Oct 13 13:55:05 2007
@@ -0,0 +1,68 @@
+--- gdk/gdkwindow.c.orig 2007-10-02 11:22:11.000000000 +0200
++++ gtk+2.0-2.12.0/gdk/gdkwindow.c 2007-10-02 11:22:20.000000000 +0200
+@@ -609,18 +609,21 @@ gdk_window_get_parent (GdkWindow *window
+ GdkWindow*
+ gdk_window_get_toplevel (GdkWindow *window)
+ {
+ GdkWindowObject *obj;
+
+ g_return_val_if_fail (GDK_IS_WINDOW (window), NULL);
+
+ obj = (GdkWindowObject *)window;
+- while (GDK_WINDOW_TYPE (obj) == GDK_WINDOW_CHILD)
++ while (obj && GDK_WINDOW_TYPE (obj) == GDK_WINDOW_CHILD) {
+ obj = (GdkWindowObject *)obj->parent;
++ }
++
++ g_return_val_if_fail (obj != NULL, NULL);
+
+ return GDK_WINDOW (obj);
+ }
+
+ /**
+ * gdk_window_get_children:
+ * @window: a #GdkWindow
+ *
+@@ -2290,19 +2293,21 @@ gdk_window_update_idle (gpointer data)
+ return FALSE;
+ }
+
+ static gboolean
+ gdk_window_is_toplevel_frozen (GdkWindow *window)
+ {
+ GdkWindowObject *toplevel;
+
++ g_return_val_if_fail (window != NULL, FALSE);
++
+ toplevel = (GdkWindowObject *)gdk_window_get_toplevel (window);
+
+- return toplevel->update_and_descendants_freeze_count > 0;
++ return toplevel ? toplevel->update_and_descendants_freeze_count > 0 : FALSE;
+ }
+
+ static void
+ gdk_window_schedule_update (GdkWindow *window)
+ {
+ if (window &&
+ (GDK_WINDOW_OBJECT (window)->update_freeze_count ||
+ gdk_window_is_toplevel_frozen (window)))
+@@ -2428,16 +2433,19 @@ gdk_window_process_all_updates (void)
+
+ update_windows = NULL;
+ update_idle = 0;
+
+ g_slist_foreach (old_update_windows, (GFunc)g_object_ref, NULL);
+
+ while (tmp_list)
+ {
++ if(!tmp_list->data)
++ continue;
++
+ GdkWindowObject *private = (GdkWindowObject *)tmp_list->data;
+
+ if (private->update_freeze_count ||
+ gdk_window_is_toplevel_frozen (tmp_list->data))
+ update_windows = g_slist_prepend (update_windows, private);
+ else
+ gdk_window_process_updates_internal (tmp_list->data);
+
Index: extra/lib/gtk2/PKGBUILD
diff -u extra/lib/gtk2/PKGBUILD:1.100 extra/lib/gtk2/PKGBUILD:1.101
--- extra/lib/gtk2/PKGBUILD:1.100 Thu Sep 20 13:06:57 2007
+++ extra/lib/gtk2/PKGBUILD Sat Oct 13 13:55:06 2007
@@ -1,9 +1,9 @@
-# $Id: PKGBUILD,v 1.100 2007/09/20 17:06:57 jgc Exp $
+# $Id: PKGBUILD,v 1.101 2007/10/13 17:55:06 jgc Exp $
# Maintainer: Jan de Groot <jgc at archlinux.org>
pkgname=gtk2
pkgver=2.12.0
-pkgrel=1
+pkgrel=2
pkgdesc="The GTK+ Toolkit (v2)"
arch=(i686 x86_64)
url="http://www.gtk.org/"
@@ -19,7 +19,12 @@
gtkclipboard-check.patch
gtkiconcache-disable-debug.patch
gtksearchenginetracker-update-modulename.patch
- gtkselection-dontcrash-on-null.patch)
+ gtkselection-dontcrash-on-null.patch
+ swt-tooltips.patch
+ simple-search-crash.patch
+ scale-button-grab.patch
+ double-free.patch
+ 071_fix_gdk_window_null_crasher.patch)
md5sums=('e9c280afec29b11772af5a7c807abf41'
'4025d3c15d6c6f73a032f403ffd4ff1c'
'ae9397c9adc43f902e4491c8276504cf'
@@ -28,10 +33,22 @@
build() {
cd ${startdir}/src/gtk+-${pkgver}
+ # Workaround patch for flash
patch -Np1 -i ${startdir}/src/gtkclipboard-check.patch || return 1
+
+ #Upstream SVN patches
patch -Np1 -i ${startdir}/src/gtkiconcache-disable-debug.patch || return 1
patch -Np1 -i ${startdir}/src/gtksearchenginetracker-update-modulename.patch || return 1
patch -Np1 -i ${startdir}/src/gtkselection-dontcrash-on-null.patch || return 1
+
+ patch -Np1 -i ${startdir}/src/swt-tooltips.patch || return 1
+ patch -Np0 -i ${startdir}/src/simple-search-crash.patch || return 1
+ patch -Np0 -i ${startdir}/src/scale-button-grab.patch || return 1
+ patch -Np1 -i ${startdir}/src/double-free.patch || return 1
+
+ #Patch from Ubuntu
+ patch -Np1 -i ${startdir}/src/071_fix_gdk_window_null_crasher.patch || return 1
+
./configure --prefix=/usr --sysconfdir=/etc \
--localstatedir=/var --with-xinput=xfree \
--with-included-loaders=png
Index: extra/lib/gtk2/double-free.patch
diff -u /dev/null extra/lib/gtk2/double-free.patch:1.1
--- /dev/null Sat Oct 13 13:55:06 2007
+++ extra/lib/gtk2/double-free.patch Sat Oct 13 13:55:06 2007
@@ -0,0 +1,11 @@
+diff -up gtk+-2.12.0/gtk/updateiconcache.c.double-free gtk+-2.12.0/gtk/updateiconcache.c
+--- gtk+-2.12.0/gtk/updateiconcache.c.double-free 2007-10-11 15:33:11.000000000 -0400
++++ gtk+-2.12.0/gtk/updateiconcache.c 2007-10-11 15:33:38.000000000 -0400
+@@ -219,7 +219,6 @@ foreach_remove_func (gpointer key, gpoin
+ {
+ /* just a .icon file, throw away */
+ g_free (key);
+- free_icon_data (image->icon_data);
+ g_free (image);
+
+ return TRUE;
Index: extra/lib/gtk2/scale-button-grab.patch
diff -u /dev/null extra/lib/gtk2/scale-button-grab.patch:1.1
--- /dev/null Sat Oct 13 13:55:06 2007
+++ extra/lib/gtk2/scale-button-grab.patch Sat Oct 13 13:55:06 2007
@@ -0,0 +1,42 @@
+Index: gtk/gtkscalebutton.c
+===================================================================
+--- gtk/gtkscalebutton.c (revision 18880)
++++ gtk/gtkscalebutton.c (revision 18881)
+@@ -877,6 +877,9 @@
+
+ priv = button->priv;
+
++ if (!GTK_WIDGET_HAS_GRAB (priv->dock))
++ return;
++
+ if (gtk_widget_is_ancestor (gtk_grab_get_current (), priv->dock))
+ return;
+
+Index: tests/testvolumebutton.c
+===================================================================
+--- tests/testvolumebutton.c (revision 18880)
++++ tests/testvolumebutton.c (revision 18881)
+@@ -60,15 +60,22 @@
+ {
+ GtkWidget *window;
+ GtkWidget *button;
++ GtkWidget *button2;
++ GtkWidget *box;
+
+ gtk_init (&argc, &argv);
+
+ window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
+ button = gtk_volume_button_new ();
++ button2 = gtk_volume_button_new ();
++ box = gtk_hbox_new (FALSE, 0);
++
+ g_signal_connect (G_OBJECT (button),
+ "value-changed",
+ G_CALLBACK (value_changed), NULL);
+- gtk_container_add (GTK_CONTAINER (window), button);
++ gtk_container_add (GTK_CONTAINER (window), box);
++ gtk_container_add (GTK_CONTAINER (box), button);
++ gtk_container_add (GTK_CONTAINER (box), button2);
+
+ gtk_widget_show_all (window);
+ gtk_button_clicked (GTK_BUTTON (button));
Index: extra/lib/gtk2/simple-search-crash.patch
diff -u /dev/null extra/lib/gtk2/simple-search-crash.patch:1.1
--- /dev/null Sat Oct 13 13:55:06 2007
+++ extra/lib/gtk2/simple-search-crash.patch Sat Oct 13 13:55:06 2007
@@ -0,0 +1,84 @@
+Index: gtk/gtksearchenginesimple.c
+===================================================================
+--- gtk/gtksearchenginesimple.c (revision 18864)
++++ gtk/gtksearchenginesimple.c (working copy)
+@@ -72,19 +72,27 @@ struct _GtkSearchEngineSimplePrivate
+ G_DEFINE_TYPE (GtkSearchEngineSimple, _gtk_search_engine_simple, GTK_TYPE_SEARCH_ENGINE);
+
+ static void
+-finalize (GObject *object)
++gtk_search_engine_simple_dispose (GObject *object)
+ {
+ GtkSearchEngineSimple *simple;
++ GtkSearchEngineSimplePrivate *priv;
+
+ simple = GTK_SEARCH_ENGINE_SIMPLE (object);
++ priv = simple->priv;
+
+- if (simple->priv->query)
++ if (priv->query)
++ {
++ g_object_unref (priv->query);
++ priv->query = NULL;
++ }
++
++ if (priv->active_search)
+ {
+- g_object_unref (simple->priv->query);
+- simple->priv->query = NULL;
++ priv->active_search->cancelled = TRUE;
++ priv->active_search = NULL;
+ }
+
+- G_OBJECT_CLASS (_gtk_search_engine_simple_parent_class)->finalize (object);
++ G_OBJECT_CLASS (_gtk_search_engine_simple_parent_class)->dispose (object);
+ }
+
+ static SearchThreadData *
+@@ -131,12 +139,10 @@ search_thread_done_idle (gpointer user_d
+
+ data = user_data;
+
+- if (!data->cancelled)
+- {
+- _gtk_search_engine_finished (GTK_SEARCH_ENGINE (data->engine));
+- data->engine->priv->active_search = NULL;
+- }
+-
++ if (!data->cancelled)
++ _gtk_search_engine_finished (GTK_SEARCH_ENGINE (data->engine));
++
++ data->engine->priv->active_search = NULL;
+ search_thread_data_free (data);
+
+ return FALSE;
+@@ -181,6 +187,7 @@ send_batch (SearchThreadData *data)
+ hits = g_new (SearchHits, 1);
+ hits->uris = data->uri_hits;
+ hits->thread_data = data;
++
+ gdk_threads_add_idle (search_thread_add_hits_idle, hits);
+ }
+ data->uri_hits = NULL;
+@@ -349,7 +356,7 @@ _gtk_search_engine_simple_class_init (Gt
+ GtkSearchEngineClass *engine_class;
+
+ gobject_class = G_OBJECT_CLASS (class);
+- gobject_class->finalize = finalize;
++ gobject_class->dispose = gtk_search_engine_simple_dispose;
+
+ engine_class = GTK_SEARCH_ENGINE_CLASS (class);
+ engine_class->set_query = gtk_search_engine_simple_set_query;
+Index: gtk/gtkfilechooserdefault.c
+===================================================================
+--- gtk/gtkfilechooserdefault.c (revision 18864)
++++ gtk/gtkfilechooserdefault.c (working copy)
+@@ -8994,6 +8994,8 @@ search_stop_searching (GtkFileChooserDef
+
+ if (impl->search_engine)
+ {
++ _gtk_search_engine_stop (impl->search_engine);
++
+ g_object_unref (impl->search_engine);
+ impl->search_engine = NULL;
+ }
Index: extra/lib/gtk2/swt-tooltips.patch
diff -u /dev/null extra/lib/gtk2/swt-tooltips.patch:1.1
--- /dev/null Sat Oct 13 13:55:06 2007
+++ extra/lib/gtk2/swt-tooltips.patch Sat Oct 13 13:55:06 2007
@@ -0,0 +1,13 @@
+diff -up gtk+-2.12.0/gtk/gtktooltips.c.swt-tooltips gtk+-2.12.0/gtk/gtktooltips.c
+--- gtk+-2.12.0/gtk/gtktooltips.c.swt-tooltips 2007-09-20 15:47:54.000000000 -0400
++++ gtk+-2.12.0/gtk/gtktooltips.c 2007-09-20 15:48:22.000000000 -0400
+@@ -229,7 +229,8 @@ gtk_tooltips_set_tip (GtkTooltips *toolt
+ return;
+ }
+
+- if (tooltips->active_tips_data
++ if (tooltipsdata
++ && tooltips->active_tips_data
+ && tooltips->active_tips_data->widget == widget
+ && GTK_WIDGET_DRAWABLE (tooltips->active_tips_data->widget))
+ {
More information about the arch-commits
mailing list