summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcin Banasiak2013-05-25 20:18:52 (GMT)
committerMarcin Banasiak2013-05-25 20:18:52 (GMT)
commit65e32bc90322cc70453f3f9c79fdd391ed457728 (patch)
tree88312e74492b8b60ef8ae36df7e1918c59c6d702
parentd8998609db246af6deb84db86cf17563fb7dd80e (diff)
downloadclutter-65e32bc90322cc70453f3f9c79fdd391ed457728.zip
clutter-65e32bc90322cc70453f3f9c79fdd391ed457728.tar.gz
Backport upstream patch to fix gnome-shell crashes. Release 2auto/th/clutter-1.14.4-2
-rw-r--r--clutter-bug692706.patch52
-rw-r--r--clutter.spec4
2 files changed, 55 insertions, 1 deletions
diff --git a/clutter-bug692706.patch b/clutter-bug692706.patch
new file mode 100644
index 0000000..92be380
--- /dev/null
+++ b/clutter-bug692706.patch
@@ -0,0 +1,52 @@
+From a586c23ddcef9a11f6e343b4b6848cde2df54927 Mon Sep 17 00:00:00 2001
+From: Emmanuele Bassi <ebassi@gnome.org>
+Date: Mon, 06 May 2013 22:46:25 +0000
+Subject: 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
+(cherry picked from commit 19391a9626b087bd4df452e8699d53caa54c350f)
+
+Signed-off-by: Emmanuele Bassi <ebassi@gnome.org>
+---
+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));
+
+--
+cgit v0.9.1
diff --git a/clutter.spec b/clutter.spec
index 3c125a4..6555d6f 100644
--- a/clutter.spec
+++ b/clutter.spec
@@ -2,13 +2,14 @@ Summary: Library for rich GUIs
Summary(pl.UTF-8): Biblioteka do bogatych graficznych interfejsów użytkownika
Name: clutter
Version: 1.14.4
-Release: 1
+Release: 2
License: LGPL v2+
Group: Libraries
Source0: http://ftp.gnome.org/pub/GNOME/sources/clutter/1.14/%{name}-%{version}.tar.xz
# Source0-md5: c072e4c27e69368f2b877ea4f6da2cdf
Patch0: gtkdoc.patch
Patch1: missing.patch
+Patch2: clutter-bug692706.patch
URL: http://www.clutter-project.org/
BuildRequires: OpenGL-GLX-devel
BuildRequires: atk-devel >= 1:2.5.3
@@ -126,6 +127,7 @@ Dokumentacja API clutter.
%setup -q
%patch0 -p1
%patch1 -p1
+%patch2 -p1
%build
%{__gtkdocize}