From 88070da3514a27b9cbd66888cfc992f8a0f60797 Mon Sep 17 00:00:00 2001 From: Adam Jackson Date: Mon, 7 Oct 2013 17:04:27 -0400 Subject: [PATCH] Fix touchpads to not warp to bizarre places on initial touch. --- clutter-1.16.0-fix-evdev-touchpad.patch | 38 +++++++++++++++++++++++++ clutter.spec | 7 ++++- 2 files changed, 44 insertions(+), 1 deletion(-) create mode 100644 clutter-1.16.0-fix-evdev-touchpad.patch diff --git a/clutter-1.16.0-fix-evdev-touchpad.patch b/clutter-1.16.0-fix-evdev-touchpad.patch new file mode 100644 index 0000000..9cededf --- /dev/null +++ b/clutter-1.16.0-fix-evdev-touchpad.patch @@ -0,0 +1,38 @@ +diff -up clutter-1.16.0/clutter/evdev/clutter-device-manager-evdev.c.jx clutter-1.16.0/clutter/evdev/clutter-device-manager-evdev.c +--- clutter-1.16.0/clutter/evdev/clutter-device-manager-evdev.c.jx 2013-09-22 13:22:30.000000000 -0400 ++++ clutter-1.16.0/clutter/evdev/clutter-device-manager-evdev.c 2013-10-07 16:48:28.232916813 -0400 +@@ -535,11 +535,6 @@ dispatch_one_event (ClutterEventSource * + else if (e->code == BTN_TOOL_FINGER && e->value != AUTOREPEAT_VALUE) + { + source->touching = e->value; +- if (e->value) +- { +- source->last_x = source->cur_x; +- source->last_y = source->cur_y; +- } + } + else + { +@@ -580,6 +575,22 @@ dispatch_one_event (ClutterEventSource * + break; + + case EV_ABS: ++ /* first touch is magic */ ++ if (source->touching == 1) ++ { ++ switch (e->code) ++ { ++ case ABS_X: ++ source->last_x = source->cur_x = e->value; ++ break; ++ case ABS_Y: ++ source->last_y = source->cur_y = e->value; ++ source->touching = 2; /* note, assumes delivery order... */ ++ break; ++ } ++ break; ++ } ++ + switch (e->code) + { + case ABS_X: diff --git a/clutter.spec b/clutter.spec index 8783573..add7912 100644 --- a/clutter.spec +++ b/clutter.spec @@ -6,13 +6,14 @@ Name: clutter Version: 1.16.0 -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.16/clutter-%{version}.tar.xz +Patch0: clutter-1.16.0-fix-evdev-touchpad.patch BuildRequires: glib2-devel mesa-libGL-devel pkgconfig pango-devel BuildRequires: cairo-gobject-devel gdk-pixbuf2-devel atk-devel @@ -79,6 +80,7 @@ This package contains documentation for clutter. %prep %setup -q +%patch0 -p1 -b .touch %build (if ! test -x configure; then NOCONFIGURE=1 ./autogen.sh; CONFIGFLAGS=--enable-gtk-doc; fi; @@ -130,6 +132,9 @@ find %{buildroot} -name '*.la' -exec rm -f {} ';' %{_datadir}/gtk-doc/html/cally %changelog +* Mon Oct 07 2013 Adam Jackson 1.16.0-2 +- Fix touchpads to not warp to bizarre places on initial touch. + * Tue Sep 24 2013 Kalev Lember - 1.16.0-1 - Update to 1.16.0