[vte3] add upstream build fix
Matthias Clasen
mclasen at fedoraproject.org
Fri Jan 7 19:39:24 UTC 2011
commit 9e26089e74a1867d422d8033173dce9076bf882b
Author: Matthias Clasen <mclasen at redhat.com>
Date: Fri Jan 7 14:38:55 2011 -0500
add upstream build fix
vte-gtk-quit-add.patch | 66 ++++++++++++++++++++++++++++++++++++++++++++++++
vte3.spec | 4 +++
2 files changed, 70 insertions(+), 0 deletions(-)
---
diff --git a/vte-gtk-quit-add.patch b/vte-gtk-quit-add.patch
new file mode 100644
index 0000000..c450a8f
--- /dev/null
+++ b/vte-gtk-quit-add.patch
@@ -0,0 +1,66 @@
+diff -up vte-0.27.3/src/vtedraw.c.gtk-quit-add vte-0.27.3/src/vtedraw.c
+--- vte-0.27.3/src/vtedraw.c.gtk-quit-add 2010-08-05 04:45:57.000000000 -0400
++++ vte-0.27.3/src/vtedraw.c 2011-01-07 14:35:31.825992996 -0500
+@@ -101,10 +101,6 @@
+ *
+ * * Zooming in and out a terminal reuses the font info structs.
+ *
+- * Since we use gdk timeout to schedule the delayed destruction, we also
+- * add a gtk quit handler which is run when the innermost main loop exits
+- * to cleanup any pending delayed destructions.
+- *
+ *
+ * Pre-caching ASCII letters:
+ *
+@@ -447,42 +443,6 @@ font_info_free (struct font_info *info)
+
+
+ static GHashTable *font_info_for_context;
+-static guint quit_id;
+-
+-static gboolean
+-cleanup_delayed_font_info_destroys_predicate (PangoContext *context,
+- struct font_info *info)
+-{
+- if (info->destroy_timeout) {
+- g_source_remove (info->destroy_timeout);
+- info->destroy_timeout = 0;
+-
+- font_info_free (info);
+- return TRUE;
+- }
+-
+- return FALSE;
+-}
+-
+-static gboolean
+-cleanup_delayed_font_info_destroys (void)
+-{
+- g_hash_table_foreach_remove (font_info_for_context,
+- (GHRFunc) cleanup_delayed_font_info_destroys_predicate,
+- NULL);
+-
+- quit_id = 0;
+- return 0;
+-}
+-
+-static void
+-ensure_quit_handler (void)
+-{
+- if (G_UNLIKELY (quit_id == 0))
+- quit_id = gtk_quit_add (1,
+- (GtkFunction) cleanup_delayed_font_info_destroys,
+- NULL);
+-}
+
+ static struct font_info *
+ font_info_register (struct font_info *info)
+@@ -543,8 +503,6 @@ font_info_destroy (struct font_info *inf
+ if (info->ref_count)
+ return;
+
+- /* Delay destruction by a few seconds, in case we need it again */
+- ensure_quit_handler ();
+ info->destroy_timeout = gdk_threads_add_timeout_seconds (FONT_CACHE_TIMEOUT,
+ (GSourceFunc) font_info_destroy_delayed,
+ info);
diff --git a/vte3.spec b/vte3.spec
index 72d10e0..ae52fd4 100644
--- a/vte3.spec
+++ b/vte3.spec
@@ -8,6 +8,9 @@ Group: User Interface/X
#VCS: git:git://git.gnome.org/vte
Source: http://download.gnome.org/sources/vte/0.27/vte-%{version}.tar.bz2
+# upstream patch
+Patch0: vte-gtk-quit-add.patch
+
BuildRequires: gtk3-devel >= 2.99
BuildRequires: ncurses-devel
BuildRequires: gettext
@@ -35,6 +38,7 @@ vte.
%prep
%setup -q -n vte-%{version}
+%patch0 -p1 -b .gtk-quit-add
%build
%configure \
More information about the scm-commits
mailing list