Add patches to fix crashes with touch events
This commit is contained in:
parent
69df947afb
commit
40605a68d6
28
0001-event-Fix-copying-touch-events.patch
Normal file
28
0001-event-Fix-copying-touch-events.patch
Normal file
@ -0,0 +1,28 @@
|
||||
From 4dbef9a98ed5956838f7b7f550d0cdc65d98aa97 Mon Sep 17 00:00:00 2001
|
||||
From: Bastien Nocera <hadess@hadess.net>
|
||||
Date: Thu, 3 May 2012 18:56:45 +0200
|
||||
Subject: [PATCH 1/2] event: Fix copying touch events
|
||||
|
||||
We were trying to copy motion axes instead of touch ones.
|
||||
|
||||
https://bugzilla.gnome.org/show_bug.cgi?id=675371
|
||||
---
|
||||
clutter/clutter-event.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/clutter/clutter-event.c b/clutter/clutter-event.c
|
||||
index c878b5e..abd2fb5 100644
|
||||
--- a/clutter/clutter-event.c
|
||||
+++ b/clutter/clutter-event.c
|
||||
@@ -1174,7 +1174,7 @@ clutter_event_copy (const ClutterEvent *event)
|
||||
case CLUTTER_TOUCH_END:
|
||||
case CLUTTER_TOUCH_CANCEL:
|
||||
if (event->touch.axes != NULL)
|
||||
- new_event->touch.axes = g_memdup (event->motion.axes,
|
||||
+ new_event->touch.axes = g_memdup (event->touch.axes,
|
||||
sizeof (gdouble) * n_axes);
|
||||
break;
|
||||
|
||||
--
|
||||
1.7.10
|
||||
|
44
0002-x11-device-manager-xi2-Fix-assertions-with-touch.patch
Normal file
44
0002-x11-device-manager-xi2-Fix-assertions-with-touch.patch
Normal file
@ -0,0 +1,44 @@
|
||||
From cb4f63277186cd7d87e49125679dcbe5c725fe95 Mon Sep 17 00:00:00 2001
|
||||
From: Bastien Nocera <hadess@hadess.net>
|
||||
Date: Thu, 3 May 2012 18:58:12 +0200
|
||||
Subject: [PATCH 2/2] x11/device-manager-xi2: Fix assertions with touch
|
||||
|
||||
When getting touch events, the device manager would try
|
||||
to pass an invalid device to translate_axes().
|
||||
|
||||
clutter_event_set_device() will only update event->touch.device
|
||||
for touch events, not event->motion.device, as used.
|
||||
|
||||
Fixes Totem crashing on mouse motion/button press when using
|
||||
a touchpad.
|
||||
|
||||
https://bugzilla.gnome.org/show_bug.cgi?id=675371
|
||||
---
|
||||
clutter/x11/clutter-device-manager-xi2.c | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/clutter/x11/clutter-device-manager-xi2.c b/clutter/x11/clutter-device-manager-xi2.c
|
||||
index 681c690..73e99af 100644
|
||||
--- a/clutter/x11/clutter-device-manager-xi2.c
|
||||
+++ b/clutter/x11/clutter-device-manager-xi2.c
|
||||
@@ -1045,7 +1045,7 @@ clutter_device_manager_xi2_translate_event (ClutterEventTranslator *translator,
|
||||
GINT_TO_POINTER (xev->deviceid));
|
||||
clutter_event_set_device (event, device);
|
||||
|
||||
- event->touch.axes = translate_axes (event->motion.device,
|
||||
+ event->touch.axes = translate_axes (event->touch.device,
|
||||
event->motion.x,
|
||||
event->motion.y,
|
||||
stage_x11,
|
||||
@@ -1098,7 +1098,7 @@ clutter_device_manager_xi2_translate_event (ClutterEventTranslator *translator,
|
||||
GINT_TO_POINTER (xev->deviceid));
|
||||
clutter_event_set_device (event, device);
|
||||
|
||||
- event->touch.axes = translate_axes (event->motion.device,
|
||||
+ event->touch.axes = translate_axes (event->touch.device,
|
||||
event->motion.x,
|
||||
event->motion.y,
|
||||
stage_x11,
|
||||
--
|
||||
1.7.10
|
||||
|
11
clutter.spec
11
clutter.spec
@ -1,6 +1,6 @@
|
||||
Name: clutter
|
||||
Version: 1.10.4
|
||||
Release: 1%{?dist}
|
||||
Release: 2%{?dist}
|
||||
Summary: Open Source software library for creating rich graphical user interfaces
|
||||
|
||||
Group: Development/Libraries
|
||||
@ -19,6 +19,10 @@ BuildRequires: libXdamage-devel
|
||||
BuildRequires: libXi-devel
|
||||
Requires: gobject-introspection
|
||||
|
||||
# https://bugzilla.gnome.org/show_bug.cgi?id=675371
|
||||
Patch0: 0001-event-Fix-copying-touch-events.patch
|
||||
Patch1: 0002-x11-device-manager-xi2-Fix-assertions-with-touch.patch
|
||||
|
||||
# Obsolete clutter packages that have been removed from Fedora
|
||||
Obsoletes: clutter-gesture < 0.0.2-3
|
||||
Obsoletes: clutter-gesture-devel < 0.0.2-3
|
||||
@ -59,6 +63,8 @@ This package contains documentation for clutter.
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
%patch0 -p1
|
||||
%patch1 -p1
|
||||
|
||||
%build
|
||||
(if ! test -x configure; then NOCONFIGURE=1 ./autogen.sh; CONFIGFLAGS=--enable-gtk-doc; fi;
|
||||
@ -103,6 +109,9 @@ find %{buildroot} -name '*.la' -exec rm -f {} ';'
|
||||
%{_datadir}/gtk-doc/html/cally
|
||||
|
||||
%changelog
|
||||
* Thu May 03 2012 Bastien Nocera <bnocera@redhat.com> 1.10.4-2
|
||||
- Add patches to fix crashes with touch events
|
||||
|
||||
* Tue May 1 2012 Peter Robinson <pbrobinson@fedoraproject.org> - 1.10.4-1
|
||||
- Update to 1.10.4
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user