diff options
author | kwm <kwm@df743ca5-7f9a-e211-a948-0013205c9059> | 2013-01-07 18:14:43 +0800 |
---|---|---|
committer | kwm <kwm@df743ca5-7f9a-e211-a948-0013205c9059> | 2013-01-07 18:14:43 +0800 |
commit | 567aab602000918c51f028e873d2d24acf5e3200 (patch) | |
tree | 037bf71d09495ec39ab780e4c8e848673fa59d62 /x11-toolkits | |
parent | aae61eca6879650169583d5b9620d1fcd0d77fb2 (diff) | |
download | marcuscom-ports-567aab602000918c51f028e873d2d24acf5e3200.tar.gz marcuscom-ports-567aab602000918c51f028e873d2d24acf5e3200.tar.zst marcuscom-ports-567aab602000918c51f028e873d2d24acf5e3200.zip |
Fix a combobox crasher
Submitted by: gnome distribution ML
Obtained from: gtk+ git
git-svn-id: svn://creme-brulee.marcuscom.com/ports/trunk@17187 df743ca5-7f9a-e211-a948-0013205c9059
Diffstat (limited to 'x11-toolkits')
-rw-r--r-- | x11-toolkits/gtk30/Makefile | 4 | ||||
-rw-r--r-- | x11-toolkits/gtk30/files/patch-bug691186 | 57 |
2 files changed, 59 insertions, 2 deletions
diff --git a/x11-toolkits/gtk30/Makefile b/x11-toolkits/gtk30/Makefile index 8479bfc56..5c00db456 100644 --- a/x11-toolkits/gtk30/Makefile +++ b/x11-toolkits/gtk30/Makefile @@ -1,10 +1,10 @@ # Created by: Vanilla I. Shu <vanilla@MinJe.com.TW> # $FreeBSD$ -# $MCom: ports/x11-toolkits/gtk30/Makefile,v 1.50 2012/12/09 21:51:46 kwm Exp $ +# $MCom: ports/x11-toolkits/gtk30/Makefile,v 1.51 2013/01/04 19:37:00 kwm Exp $ PORTNAME= gtk PORTVERSION= 3.6.3 -PORTREVISION?= 0 +PORTREVISION?= 1 CATEGORIES= x11-toolkits MASTER_SITES= GNOME MASTER_SITE_SUBDIR= sources/gtk+/${PORTVERSION:C/^([0-9]+\.[0-9]+).*/\1/} diff --git a/x11-toolkits/gtk30/files/patch-bug691186 b/x11-toolkits/gtk30/files/patch-bug691186 new file mode 100644 index 000000000..17c41ed48 --- /dev/null +++ b/x11-toolkits/gtk30/files/patch-bug691186 @@ -0,0 +1,57 @@ +From 7f0b30d7d40acaaaa2ecda603903c00544232bb8 Mon Sep 17 00:00:00 2001 +From: Benjamin Otte <otte@redhat.com> +Date: Sun, 06 Jan 2013 22:08:28 +0000 +Subject: stylecontext: Make font hack not crash + +It's a lot uglier now, but it shouldn't crash anymore. + +We must update the font description for animations, but we can't free it +on query, because some paths call gtk_style_context_get_font() twice in +a row without stopping the use of the first call. So us just creating a +new font description all the time and unreffing the old one is not a +good idea. So we just mere the new one into the old one. + +https://bugzilla.gnome.org/show_bug.cgi?id=691186 +--- +diff --git a/gtk/gtkstylecontext.c b/gtk/gtkstylecontext.c +index bcbea77..f081361 100644 +--- a/gtk/gtkstylecontext.c ++++ b/gtk/gtkstylecontext.c +@@ -3508,7 +3508,7 @@ gtk_style_context_get_font (GtkStyleContext *context, + { + GtkStyleContextPrivate *priv; + StyleData *data; +- PangoFontDescription *description; ++ PangoFontDescription *description, *previous; + + g_return_val_if_fail (GTK_IS_STYLE_CONTEXT (context), NULL); + +@@ -3520,10 +3520,22 @@ gtk_style_context_get_font (GtkStyleContext *context, + /* Yuck, fonts are created on-demand but we don't return a ref. + * Do bad things to achieve this requirement */ + gtk_style_context_get (context, state, "font", &description, NULL); +- g_object_set_data_full (G_OBJECT (data->store), +- "font-cache-for-get_font", +- description, +- (GDestroyNotify) pango_font_description_free); ++ ++ previous = g_object_get_data (G_OBJECT (data->store), "font-cache-for-get_font"); ++ ++ if (previous) ++ { ++ pango_font_description_merge (previous, description, TRUE); ++ pango_font_description_free (description); ++ description = previous; ++ } ++ else ++ { ++ g_object_set_data_full (G_OBJECT (data->store), ++ "font-cache-for-get_font", ++ description, ++ (GDestroyNotify) pango_font_description_free); ++ } + + return description; + } +-- +cgit v0.9.0.2 |