[arch-commits] Commit in clutter/trunk (PKGBUILD libinput08.patch)

Jan Steffens heftig at archlinux.org
Sun Jan 18 00:19:50 UTC 2015


    Date: Sunday, January 18, 2015 @ 01:19:49
  Author: heftig
Revision: 229503

libinput 0.8

Added:
  clutter/trunk/libinput08.patch
Modified:
  clutter/trunk/PKGBUILD

------------------+
 PKGBUILD         |   12 ++++---
 libinput08.patch |   90 +++++++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 98 insertions(+), 4 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2015-01-17 22:04:33 UTC (rev 229502)
+++ PKGBUILD	2015-01-18 00:19:49 UTC (rev 229503)
@@ -5,7 +5,7 @@
 
 pkgname=clutter
 pkgver=1.20.0
-pkgrel=2
+pkgrel=3
 pkgdesc="A GObject based library for creating fast, visually rich graphical user interfaces"
 arch=('i686' 'x86_64')
 url="http://clutter-project.org/"
@@ -12,16 +12,18 @@
 license=('LGPL')
 depends=('cogl' 'mesa' 'json-glib' 'atk' 'libxi' 'libxkbcommon' 'libinput')
 makedepends=('gobject-introspection' 'python2')
-source=(http://download.gnome.org/sources/$pkgname/${pkgver:0:4}/$pkgname-$pkgver.tar.xz
+source=(https://download.gnome.org/sources/$pkgname/${pkgver:0:4}/$pkgname-$pkgver.tar.xz
         closure-annotation.patch
         evdev-flush-event-queue.patch
         dont-update-pangocontext.patch
-        create-pangocontext-per-actor.patch)
+        create-pangocontext-per-actor.patch
+        libinput08.patch)
 sha256sums=('cc940809e6e1469ce349c4bddb0cbcc2c13c087d4fc15cda9278d855ee2d1293'
             'af2931bfd1f444244edd84e49e926ee82d434703d56ae77759ce0635f5f72475'
             '0d2508da28d5032c4ec7531396f490e4f16c98cbf99fae3c878ed3012f65dcba'
             'cdee1e269e0c11ceea3b32a3345f62e052516bb4e4be6337ae4bfec735c8750f'
-            'a3e0a47f0fe5bff8bc1170cf07c16ca6722ea49b00c704d4d00b16e2781923cd')
+            'a3e0a47f0fe5bff8bc1170cf07c16ca6722ea49b00c704d4d00b16e2781923cd'
+            '219ffb7eb7570970834f636edf6f3ad67977f5ca337dc617fc877d1cf4e998d9')
 
 prepare() {
   cd $pkgname-$pkgver
@@ -29,6 +31,8 @@
   patch -Np1 -i ../evdev-flush-event-queue.patch
   patch -Np1 -i ../dont-update-pangocontext.patch
   patch -Np1 -i ../create-pangocontext-per-actor.patch
+  patch -Np1 -i ../libinput08.patch
+  autoreconf -fi
 }
 
 build() {

Added: libinput08.patch
===================================================================
--- libinput08.patch	                        (rev 0)
+++ libinput08.patch	2015-01-18 00:19:49 UTC (rev 229503)
@@ -0,0 +1,90 @@
+From ede13b11d72a310e535f9a6f0b7e3f774f5529dc Mon Sep 17 00:00:00 2001
+From: Peter Hutterer <peter.hutterer at who-t.net>
+Date: Fri, 16 Jan 2015 01:03:52 +0100
+Subject: evdev: use libinput's new merged scroll events
+
+libinput's API changed from separate scroll events for vert/horiz scrolling to
+a single event that contains both axes if they changed.
+
+Updated by Armin K. to use the discrete axis value for wheel events as done
+in Weston.
+
+https://bugzilla.gnome.org/show_bug.cgi?id=742829
+
+diff --git a/clutter/evdev/clutter-device-manager-evdev.c b/clutter/evdev/clutter-device-manager-evdev.c
+index 7b48481..2b3828a 100644
+--- a/clutter/evdev/clutter-device-manager-evdev.c
++++ b/clutter/evdev/clutter-device-manager-evdev.c
+@@ -1191,29 +1191,43 @@ process_device_event (ClutterDeviceManagerEvdev *manager_evdev,
+ 
+     case LIBINPUT_EVENT_POINTER_AXIS:
+       {
+-        gdouble value, dx = 0.0, dy = 0.0;
++        gdouble dx = 0.0, dy = 0.0;
+         guint32 time;
++        gboolean wheel = FALSE;
+         enum libinput_pointer_axis axis;
++        enum libinput_pointer_axis_source source;
+         struct libinput_event_pointer *axis_event =
+           libinput_event_get_pointer_event (event);
++
+         device = libinput_device_get_user_data (libinput_device);
+ 
+         time = libinput_event_pointer_get_time (axis_event);
+-        value = libinput_event_pointer_get_axis_value (axis_event);
+-        axis = libinput_event_pointer_get_axis (axis_event);
++        source = libinput_event_pointer_get_axis_source (axis_event);
+ 
+-        switch (axis)
+-          {
+-          case LIBINPUT_POINTER_AXIS_SCROLL_VERTICAL:
+-            dx = 0;
+-            dy = value;
+-            break;
++        /* libinput < 0.8 sent wheel click events with value 10. Since 0.8
++           the value is the angle of the click in degrees. To keep
++           backwards-compat with existing clients, we just send multiples of
++           the click count. */
++
++        if (source == LIBINPUT_POINTER_AXIS_SOURCE_WHEEL)
++            wheel = TRUE;
+ 
+-          case LIBINPUT_POINTER_AXIS_SCROLL_HORIZONTAL:
+-            dx = value;
+-            dy = 0;
+-            break;
++        axis = LIBINPUT_POINTER_AXIS_SCROLL_VERTICAL;
++        if (libinput_event_pointer_has_axis (axis_event, axis))
++          {
++            if (wheel)
++              dy = 10 * libinput_event_pointer_get_axis_value_discrete (axis_event, axis);
++            else
++              dy = libinput_event_pointer_get_axis_value (axis_event, axis);
++          }
+ 
++        axis = LIBINPUT_POINTER_AXIS_SCROLL_HORIZONTAL;
++        if (libinput_event_pointer_has_axis (axis_event, axis))
++          {
++            if (wheel)
++              dx = 10 * libinput_event_pointer_get_axis_value_discrete (axis_event, axis);
++            else
++              dx = libinput_event_pointer_get_axis_value (axis_event, axis);
+           }
+ 
+         notify_scroll (device, time, dx, dy);
+diff --git a/configure.ac b/configure.ac
+index 0a9a580..2a47744 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -146,7 +146,7 @@ m4_define([uprof_req_version],          [0.3])
+ m4_define([gtk_doc_req_version],        [1.20])
+ m4_define([xcomposite_req_version],     [0.4])
+ m4_define([gdk_req_version],            [3.3.18])
+-m4_define([libinput_req_version],       [0.4.0])
++m4_define([libinput_req_version],       [0.8.0])
+ m4_define([libudev_req_version],        [136])
+ 
+ AC_SUBST([GLIB_REQ_VERSION],       [glib_req_version])
+-- 
+cgit v0.10.1
+



More information about the arch-commits mailing list