[clutter/f18] Backport an upstream patch for frequent gnome-shell crashes
Kalev Lember
kalev at fedoraproject.org
Fri May 17 14:58:57 UTC 2013
commit a1c721f0f9c59870f9b03ad58ddee7d1d1c609dc
Author: Kalev Lember <kalevlember at gmail.com>
Date: Fri May 17 16:45:30 2013 +0200
Backport an upstream patch for frequent gnome-shell crashes
https://bugzilla.redhat.com/show_bug.cgi?id=827158
https://bugzilla.gnome.org/show_bug.cgi?id=692706
(cherry picked from commit 2d8603a03bf3dce2a5a10e4f0169bbe58b657fd7)
...-weak-pointer-to-hold-the-key-focus-in-Ca.patch | 53 ++++++++++++++++++++
clutter.spec | 8 +++-
2 files changed, 60 insertions(+), 1 deletions(-)
---
diff --git a/0001-cally-Use-a-weak-pointer-to-hold-the-key-focus-in-Ca.patch b/0001-cally-Use-a-weak-pointer-to-hold-the-key-focus-in-Ca.patch
new file mode 100644
index 0000000..0e7b6cd
--- /dev/null
+++ b/0001-cally-Use-a-weak-pointer-to-hold-the-key-focus-in-Ca.patch
@@ -0,0 +1,53 @@
+From 19391a9626b087bd4df452e8699d53caa54c350f Mon Sep 17 00:00:00 2001
+From: Emmanuele Bassi <ebassi at gnome.org>
+Date: Mon, 6 May 2013 15:46:25 -0700
+Subject: [PATCH] cally: Use a weak pointer to hold the key focus in CallyStage
+
+We want to avoid the pointer getting stale, and causing crashes.
+
+https://bugzilla.gnome.org/show_bug.cgi?id=692706
+---
+ clutter/cally/cally-stage.c | 20 ++++++++++++++++++--
+ 1 file changed, 18 insertions(+), 2 deletions(-)
+
+diff --git a/clutter/cally/cally-stage.c b/clutter/cally/cally-stage.c
+index 2b1cfd1..c95ccb0 100644
+--- a/clutter/cally/cally-stage.c
++++ b/clutter/cally/cally-stage.c
+@@ -139,7 +139,11 @@ cally_stage_notify_key_focus_cb (ClutterStage *stage,
+ AtkObject *old = NULL;
+
+ if (self->priv->key_focus != NULL)
+- old = clutter_actor_get_accessible (self->priv->key_focus);
++ {
++ g_object_remove_weak_pointer (G_OBJECT (self->priv->key_focus),
++ (gpointer *) &self->priv->key_focus);
++ old = clutter_actor_get_accessible (self->priv->key_focus);
++ }
+ else
+ old = clutter_actor_get_accessible (CLUTTER_ACTOR (stage));
+
+@@ -154,7 +158,19 @@ cally_stage_notify_key_focus_cb (ClutterStage *stage,
+ self->priv->key_focus = key_focus;
+
+ if (key_focus != NULL)
+- new = clutter_actor_get_accessible (key_focus);
++ {
++ /* ensure that if the key focus goes away, the field inside
++ * CallyStage is reset. see bug:
++ *
++ * https://bugzilla.gnome.org/show_bug.cgi?id=692706
++ *
++ * we remove the weak pointer above.
++ */
++ g_object_add_weak_pointer (G_OBJECT (self->priv->key_focus),
++ (gpointer *) &self->priv->key_focus);
++
++ new = clutter_actor_get_accessible (key_focus);
++ }
+ else
+ new = clutter_actor_get_accessible (CLUTTER_ACTOR (stage));
+
+--
+1.8.1.4
+
diff --git a/clutter.spec b/clutter.spec
index 83fd54f..366a7cf 100644
--- a/clutter.spec
+++ b/clutter.spec
@@ -1,12 +1,14 @@
Name: clutter
Version: 1.12.2
-Release: 1%{?dist}
+Release: 2%{?dist}
Summary: Open Source software library for creating rich graphical user interfaces
Group: Development/Libraries
License: LGPLv2+
URL: http://www.clutter-project.org/
Source0: http://download.gnome.org/sources/clutter/1.12/clutter-%{version}.tar.xz
+# https://bugzilla.gnome.org/show_bug.cgi?id=692706
+Patch0: 0001-cally-Use-a-weak-pointer-to-hold-the-key-focus-in-Ca.patch
BuildRequires: glib2-devel mesa-libGL-devel pkgconfig pango-devel
BuildRequires: cairo-gobject-devel gdk-pixbuf2-devel atk-devel
@@ -71,6 +73,7 @@ This package contains documentation for clutter.
%prep
%setup -q
+%patch0 -p1 -b .cally_crash
%build
(if ! test -x configure; then NOCONFIGURE=1 ./autogen.sh; CONFIGFLAGS=--enable-gtk-doc; fi;
@@ -115,6 +118,9 @@ find %{buildroot} -name '*.la' -exec rm -f {} ';'
%{_datadir}/gtk-doc/html/cally
%changelog
+* Fri May 17 2013 Kalev Lember <kalevlember at gmail.com> - 1.12.2-2
+- Backport an upstream patch for frequent gnome-shell crashes (#827158)
+
* Wed Oct 17 2012 Kalev Lember <kalevlember at gmail.com> - 1.12.2-1
- Update to 1.12.2
More information about the scm-commits
mailing list