Hello community,

here is the log from the commit of package libinput for openSUSE:Factory 
checked in at 2019-06-05 11:37:28
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/libinput (Old)
 and      /work/SRC/openSUSE:Factory/.libinput.new.5148 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "libinput"

Wed Jun  5 11:37:28 2019 rev:74 rq:706914 version:1.13.2

Changes:
--------
--- /work/SRC/openSUSE:Factory/libinput/libinput.changes        2019-04-12 
09:11:00.825583398 +0200
+++ /work/SRC/openSUSE:Factory/.libinput.new.5148/libinput.changes      
2019-06-05 11:37:29.307091290 +0200
@@ -1,0 +2,17 @@
+Wed May 29 19:53:12 UTC 2019 - Bjørn Lie <[email protected]>
+
+- Update to version 1.13.2:
+  * Apple Bluetooth touchpads are now recognized with the correct
+    touch size, which should make finger detection more reliable.
+  * External tablets with a touchpad component (e.g. Wacom Intuos
+    Pro series) will now rotate the touchpad by 180 degrees when
+    set to left-handed. Previously only the tablet pen rotated,
+    leaving pen and touch with two different orientations. Note
+    that users need to set both the tablet and the touchpad to
+    left-handed to have this work correctly; a better fix is in the
+    works but taking longer than anticipated.
+  * The button scroll timeout reduction introduced in 1.13 is
+    reverted again, it caused a few regressions. If you had issues
+    with your middle button, that's likely going to fix it.
+
+-------------------------------------------------------------------

Old:
----
  libinput-1.13.1.tar.xz
  libinput-1.13.1.tar.xz.sig

New:
----
  libinput-1.13.2.tar.xz
  libinput-1.13.2.tar.xz.sig

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ libinput.spec ++++++
--- /var/tmp/diff_new_pack.Wso9Gt/_old  2019-06-05 11:37:30.559091130 +0200
+++ /var/tmp/diff_new_pack.Wso9Gt/_new  2019-06-05 11:37:30.583091126 +0200
@@ -22,7 +22,7 @@
 
 Name:           libinput
 %define lname  libinput10
-Version:        1.13.1
+Version:        1.13.2
 Release:        0
 Summary:        Input device and event processing library
 License:        MIT

++++++ libinput-1.13.1.tar.xz -> libinput-1.13.2.tar.xz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libinput-1.13.1/meson.build 
new/libinput-1.13.2/meson.build
--- old/libinput-1.13.1/meson.build     2019-04-09 03:50:54.000000000 +0200
+++ new/libinput-1.13.2/meson.build     2019-05-09 03:10:45.000000000 +0200
@@ -1,5 +1,5 @@
 project('libinput', 'c',
-       version : '1.13.1',
+       version : '1.13.2',
        license : 'MIT/Expat',
        default_options : [ 'c_std=gnu99', 'warning_level=2' ],
        meson_version : '>= 0.41.0')
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libinput-1.13.1/quirks/50-system-apple.quirks 
new/libinput-1.13.2/quirks/50-system-apple.quirks
--- old/libinput-1.13.1/quirks/50-system-apple.quirks   2019-04-09 
03:50:54.000000000 +0200
+++ new/libinput-1.13.2/quirks/50-system-apple.quirks   2019-05-09 
03:10:45.000000000 +0200
@@ -14,6 +14,14 @@
 MatchBus=bluetooth
 MatchUdevType=touchpad
 ModelAppleTouchpad=1
+AttrTouchSizeRange=150:130
+
+[Apple Touchpads Bluetooth (new vendor ID)]
+MatchVendor=0x004C
+MatchBus=bluetooth
+MatchUdevType=touchpad
+ModelAppleTouchpad=1
+AttrTouchSizeRange=150:130
 
 [Apple Internal Keyboard]
 MatchName=*Apple Inc. Apple Internal Keyboard*
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libinput-1.13.1/src/evdev-fallback.c 
new/libinput-1.13.2/src/evdev-fallback.c
--- old/libinput-1.13.1/src/evdev-fallback.c    2019-04-09 03:50:54.000000000 
+0200
+++ new/libinput-1.13.2/src/evdev-fallback.c    2019-05-09 03:10:45.000000000 
+0200
@@ -311,7 +311,7 @@
        if (seat_slot == -1)
                return false;
 
-       seat->slot_map |= 1 << seat_slot;
+       seat->slot_map |= bit(seat_slot);
        point = slot->point;
        slot->hysteresis_center = point;
        evdev_transform_absolute(device, &point);
@@ -374,7 +374,7 @@
        if (seat_slot == -1)
                return false;
 
-       seat->slot_map &= ~(1 << seat_slot);
+       seat->slot_map &= ~bit(seat_slot);
 
        touch_notify_touch_up(base, time, slot_idx, seat_slot);
 
@@ -402,7 +402,7 @@
        if (seat_slot == -1)
                return false;
 
-       seat->slot_map &= ~(1 << seat_slot);
+       seat->slot_map &= ~bit(seat_slot);
 
        touch_notify_touch_cancel(base, time, slot_idx, seat_slot);
 
@@ -434,7 +434,7 @@
        if (seat_slot == -1)
                return false;
 
-       seat->slot_map |= 1 << seat_slot;
+       seat->slot_map |= bit(seat_slot);
 
        point = dispatch->abs.point;
        evdev_transform_absolute(device, &point);
@@ -484,7 +484,7 @@
        if (seat_slot == -1)
                return false;
 
-       seat->slot_map &= ~(1 << seat_slot);
+       seat->slot_map &= ~bit(seat_slot);
 
        touch_notify_touch_up(base, time, -1, seat_slot);
 
@@ -509,7 +509,7 @@
        if (seat_slot == -1)
                return false;
 
-       seat->slot_map &= ~(1 << seat_slot);
+       seat->slot_map &= ~bit(seat_slot);
 
        touch_notify_touch_cancel(base, time, -1, seat_slot);
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libinput-1.13.1/src/evdev-mt-touchpad-buttons.c 
new/libinput-1.13.2/src/evdev-mt-touchpad-buttons.c
--- old/libinput-1.13.1/src/evdev-mt-touchpad-buttons.c 2019-04-09 
03:50:54.000000000 +0200
+++ new/libinput-1.13.2/src/evdev-mt-touchpad-buttons.c 2019-05-09 
03:10:45.000000000 +0200
@@ -797,7 +797,7 @@
 
        if (!tp->buttons.is_clickpad)
                return LIBINPUT_CONFIG_CLICK_METHOD_NONE;
-       else if (libevdev_get_id_vendor(tp->device->evdev) == VENDOR_ID_APPLE)
+       else if (evdev_device_has_model_quirk(device, 
QUIRK_MODEL_APPLE_TOUCHPAD))
                return LIBINPUT_CONFIG_CLICK_METHOD_CLICKFINGER;
 
        return LIBINPUT_CONFIG_CLICK_METHOD_BUTTON_AREAS;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libinput-1.13.1/src/evdev-mt-touchpad.c 
new/libinput-1.13.2/src/evdev-mt-touchpad.c
--- old/libinput-1.13.1/src/evdev-mt-touchpad.c 2019-04-09 03:50:54.000000000 
+0200
+++ new/libinput-1.13.2/src/evdev-mt-touchpad.c 2019-05-09 03:10:45.000000000 
+0200
@@ -28,6 +28,10 @@
 #include <stdbool.h>
 #include <limits.h>
 
+#if HAVE_LIBWACOM
+#include <libwacom/libwacom.h>
+#endif
+
 #include "quirks.h"
 #include "evdev-mt-touchpad.h"
 
@@ -464,6 +468,30 @@
        return delta;
 }
 
+static inline int32_t
+rotated(struct tp_dispatch *tp, unsigned int code, int value)
+{
+       const struct input_absinfo *absinfo;
+
+       if (!tp->device->left_handed.enabled ||
+           !tp->left_handed.rotate)
+               return value;
+
+       switch (code) {
+       case ABS_X:
+       case ABS_MT_POSITION_X:
+               absinfo = tp->device->abs.absinfo_x;
+               break;
+       case ABS_Y:
+       case ABS_MT_POSITION_Y:
+               absinfo = tp->device->abs.absinfo_y;
+               break;
+       default:
+               abort();
+       }
+       return absinfo->maximum - (value - absinfo->minimum);
+}
+
 static void
 tp_process_absolute(struct tp_dispatch *tp,
                    const struct input_event *e,
@@ -476,7 +504,7 @@
                evdev_device_check_abs_axis_range(tp->device,
                                                  e->code,
                                                  e->value);
-               t->point.x = e->value;
+               t->point.x = rotated(tp, e->code, e->value);
                t->time = time;
                t->dirty = true;
                tp->queued |= TOUCHPAD_EVENT_MOTION;
@@ -485,7 +513,7 @@
                evdev_device_check_abs_axis_range(tp->device,
                                                  e->code,
                                                  e->value);
-               t->point.y = e->value;
+               t->point.y = rotated(tp, e->code, e->value);
                t->time = time;
                t->dirty = true;
                tp->queued |= TOUCHPAD_EVENT_MOTION;
@@ -536,7 +564,7 @@
                evdev_device_check_abs_axis_range(tp->device,
                                                  e->code,
                                                  e->value);
-               t->point.x = e->value;
+               t->point.x = rotated(tp, e->code, e->value);
                t->time = time;
                t->dirty = true;
                tp->queued |= TOUCHPAD_EVENT_MOTION;
@@ -545,7 +573,7 @@
                evdev_device_check_abs_axis_range(tp->device,
                                                  e->code,
                                                  e->value);
-               t->point.y = e->value;
+               t->point.y = rotated(tp, e->code, e->value);
                t->time = time;
                t->dirty = true;
                tp->queued |= TOUCHPAD_EVENT_MOTION;
@@ -3700,11 +3728,80 @@
        device->left_handed.enabled = device->left_handed.want_enabled;
 }
 
+static bool
+tp_init_left_handed_rotation(struct tp_dispatch *tp,
+                            struct evdev_device *device)
+{
+       bool rotate = false;
+#if HAVE_LIBWACOM
+       WacomDeviceDatabase *db;
+       WacomDevice **devices = NULL,
+                   **d;
+       WacomDevice *dev;
+       uint32_t vid = evdev_device_get_id_vendor(device),
+                pid = evdev_device_get_id_product(device);
+
+       db = libwacom_database_new();
+       if (!db) {
+               evdev_log_info(device,
+                              "Failed to initialize libwacom context.\n");
+               goto out;
+       }
+
+       /* Check if we have a device with the same vid/pid. If not,
+          we need to loop through all devices and check their paired
+          device. */
+       dev = libwacom_new_from_usbid(db, vid, pid, NULL);
+       if (dev) {
+               rotate = libwacom_is_reversible(dev);
+               libwacom_destroy(dev);
+               goto out;
+       }
+
+       devices = libwacom_list_devices_from_database(db, NULL);
+       if (!devices)
+               goto out;
+       d = devices;
+       while(*d) {
+               const WacomMatch *paired;
+
+               paired = libwacom_get_paired_device(*d);
+               if (paired &&
+                   libwacom_match_get_vendor_id(paired) == vid &&
+                   libwacom_match_get_product_id(paired) == pid) {
+                       rotate = libwacom_is_reversible(dev);
+                       break;
+               }
+               d++;
+       }
+
+       free(devices);
+out:
+       if (db)
+               libwacom_database_destroy(db);
+#endif
+
+       return rotate;
+}
+
+static void
+tp_init_left_handed(struct tp_dispatch *tp,
+                   struct evdev_device *device)
+{
+       bool want_left_handed = true;
+
+       if (device->model_flags & EVDEV_MODEL_APPLE_TOUCHPAD_ONEBUTTON)
+               want_left_handed = false;
+       if (want_left_handed)
+               evdev_init_left_handed(device, tp_change_to_left_handed);
+
+       tp->left_handed.rotate = tp_init_left_handed_rotation(tp, device);
+}
+
 struct evdev_dispatch *
 evdev_mt_touchpad_create(struct evdev_device *device)
 {
        struct tp_dispatch *tp;
-       bool want_left_handed = true;
 
        evdev_tag_touchpad(device, device->udev_device);
 
@@ -3723,10 +3820,7 @@
        tp->sendevents.config.get_mode = tp_sendevents_get_mode;
        tp->sendevents.config.get_default_mode = tp_sendevents_get_default_mode;
 
-       if (device->model_flags & EVDEV_MODEL_APPLE_TOUCHPAD_ONEBUTTON)
-               want_left_handed = false;
-       if (want_left_handed)
-               evdev_init_left_handed(device, tp_change_to_left_handed);
+       tp_init_left_handed(tp, device);
 
        return &tp->base;
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libinput-1.13.1/src/evdev-mt-touchpad.h 
new/libinput-1.13.2/src/evdev-mt-touchpad.h
--- old/libinput-1.13.1/src/evdev-mt-touchpad.h 2019-04-09 03:50:54.000000000 
+0200
+++ new/libinput-1.13.2/src/evdev-mt-touchpad.h 2019-05-09 03:10:45.000000000 
+0200
@@ -485,6 +485,11 @@
                struct libinput_event_listener listener;
                struct evdev_device *tablet_mode_switch;
        } tablet_mode_switch;
+
+       struct {
+               /* true if the axes need rotation when left-handed is on*/
+               bool rotate;
+       } left_handed;
 };
 
 static inline struct tp_dispatch*
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libinput-1.13.1/src/evdev.c 
new/libinput-1.13.2/src/evdev.c
--- old/libinput-1.13.1/src/evdev.c     2019-04-09 03:50:54.000000000 +0200
+++ new/libinput-1.13.2/src/evdev.c     2019-05-09 03:10:45.000000000 +0200
@@ -50,7 +50,7 @@
 #endif
 
 #define DEFAULT_WHEEL_CLICK_ANGLE 15
-#define DEFAULT_BUTTON_SCROLL_TIMEOUT ms2us(38)
+#define DEFAULT_BUTTON_SCROLL_TIMEOUT ms2us(200)
 
 enum evdev_device_udev_tags {
         EVDEV_UDEV_TAG_INPUT           = bit(0),
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/libinput-1.13.1/test/litest-device-wacom-bamboo-2fg-finger.c 
new/libinput-1.13.2/test/litest-device-wacom-bamboo-2fg-finger.c
--- old/libinput-1.13.1/test/litest-device-wacom-bamboo-2fg-finger.c    
2019-04-09 03:50:55.000000000 +0200
+++ new/libinput-1.13.2/test/litest-device-wacom-bamboo-2fg-finger.c    
2019-05-09 03:10:45.000000000 +0200
@@ -71,8 +71,10 @@
 };
 
 static int events[] = {
+       EV_KEY, BTN_TOOL_FINGER,
        EV_KEY, BTN_TOUCH,
-       INPUT_PROP_MAX, INPUT_PROP_DIRECT,
+       EV_KEY, BTN_TOOL_DOUBLETAP,
+       INPUT_PROP_MAX, INPUT_PROP_POINTER,
        -1, -1,
 };
 
@@ -87,7 +89,7 @@
 
 TEST_DEVICE("wacom-bamboo-2fg-finger",
        .type = LITEST_WACOM_BAMBOO_2FG_FINGER,
-       .features = LITEST_TOUCH,
+       .features = LITEST_TOUCHPAD,
        .interface = &interface,
 
        .name = "Wacom Bamboo 2F 4x5 Finger",
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/libinput-1.13.1/test/litest-device-wacom-intuos5-finger.c 
new/libinput-1.13.2/test/litest-device-wacom-intuos5-finger.c
--- old/libinput-1.13.1/test/litest-device-wacom-intuos5-finger.c       
2019-04-09 03:50:55.000000000 +0200
+++ new/libinput-1.13.2/test/litest-device-wacom-intuos5-finger.c       
2019-05-09 03:10:45.000000000 +0200
@@ -112,7 +112,7 @@
 "\n"
 "LABEL=\"rule_end\"";
 
-TEST_DEVICE("wacom-finger",
+TEST_DEVICE("wacom-intuos5-finger",
        .type = LITEST_WACOM_FINGER,
        .features = LITEST_TOUCHPAD,
        .interface = &interface,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/libinput-1.13.1/test/litest-device-wacom-intuos5-pad.c 
new/libinput-1.13.2/test/litest-device-wacom-intuos5-pad.c
--- old/libinput-1.13.1/test/litest-device-wacom-intuos5-pad.c  2019-04-09 
03:50:55.000000000 +0200
+++ new/libinput-1.13.2/test/litest-device-wacom-intuos5-pad.c  2019-05-09 
03:10:45.000000000 +0200
@@ -100,7 +100,7 @@
 "\n"
 "LABEL=\"pad_end\"";
 
-TEST_DEVICE("wacom-pad",
+TEST_DEVICE("wacom-intuos5-pad",
        .type = LITEST_WACOM_INTUOS5_PAD,
        .features = LITEST_TABLET_PAD | LITEST_RING,
        .interface = &interface,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/libinput-1.13.1/test/litest-device-wacom-intuos5-pen.c 
new/libinput-1.13.2/test/litest-device-wacom-intuos5-pen.c
--- old/libinput-1.13.1/test/litest-device-wacom-intuos5-pen.c  2019-04-09 
03:50:55.000000000 +0200
+++ new/libinput-1.13.2/test/litest-device-wacom-intuos5-pen.c  2019-05-09 
03:10:45.000000000 +0200
@@ -151,7 +151,7 @@
 "\n"
 "LABEL=\"rule_end\"";
 
-TEST_DEVICE("wacom-intuos-tablet",
+TEST_DEVICE("wacom-intuos5-tablet",
        .type = LITEST_WACOM_INTUOS,
        .features = LITEST_TABLET | LITEST_DISTANCE | LITEST_TOOL_SERIAL | 
LITEST_TILT | LITEST_TOOL_MOUSE | LITEST_HOVER,
        .interface = &interface,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libinput-1.13.1/test/litest.c 
new/libinput-1.13.2/test/litest.c
--- old/libinput-1.13.1/test/litest.c   2019-04-09 03:50:55.000000000 +0200
+++ new/libinput-1.13.2/test/litest.c   2019-05-09 03:10:45.000000000 +0200
@@ -3640,7 +3640,7 @@
 void
 litest_timeout_buttonscroll(void)
 {
-       msleep(45);
+       msleep(300);
 }
 
 void
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libinput-1.13.1/test/test-gestures.c 
new/libinput-1.13.2/test/test-gestures.c
--- old/libinput-1.13.1/test/test-gestures.c    2019-04-09 03:50:55.000000000 
+0200
+++ new/libinput-1.13.2/test/test-gestures.c    2019-05-09 03:10:45.000000000 
+0200
@@ -173,6 +173,7 @@
        };
 
        if (libevdev_get_num_slots(dev->evdev) > 2 ||
+           !libevdev_has_event_code(dev->evdev, EV_KEY, BTN_TOOL_TRIPLETAP) ||
            !libinput_device_has_capability(dev->libinput_device,
                                            LIBINPUT_DEVICE_CAP_GESTURE))
                return;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libinput-1.13.1/test/test-touchpad-tap.c 
new/libinput-1.13.2/test/test-touchpad-tap.c
--- old/libinput-1.13.1/test/test-touchpad-tap.c        2019-04-09 
03:50:55.000000000 +0200
+++ new/libinput-1.13.2/test/test-touchpad-tap.c        2019-05-09 
03:10:45.000000000 +0200
@@ -936,8 +936,8 @@
        struct litest_device *dev = litest_current_device();
        struct libinput *li = dev->libinput;
 
-       if (libevdev_get_abs_maximum(dev->evdev,
-                                    ABS_MT_SLOT) > 2)
+       if (libevdev_get_abs_maximum(dev->evdev, ABS_MT_SLOT) > 2 ||
+           !libevdev_has_event_code(dev->evdev, EV_KEY, BTN_TOOL_TRIPLETAP))
                return;
 
        litest_enable_tap(dev->libinput_device);
@@ -1676,7 +1676,8 @@
        struct litest_device *dev = litest_current_device();
        struct libinput *li = dev->libinput;
 
-       if (libevdev_get_abs_maximum(dev->evdev, ABS_MT_SLOT) >= 2)
+       if (libevdev_get_abs_maximum(dev->evdev, ABS_MT_SLOT) >= 2 ||
+           !libevdev_has_event_code(dev->evdev, EV_KEY, BTN_TOOL_TRIPLETAP))
                return;
 
        /* libinput doesn't export when it uses pressure detection, so we
@@ -1736,8 +1737,9 @@
        struct litest_device *dev = litest_current_device();
        struct libinput *li = dev->libinput;
 
-       if (libevdev_get_abs_maximum(dev->evdev, ABS_MT_SLOT) >= 2)
-           return;
+       if (libevdev_get_abs_maximum(dev->evdev, ABS_MT_SLOT) >= 2 ||
+           !libevdev_has_event_code(dev->evdev, EV_KEY, BTN_TOOL_TRIPLETAP))
+               return;
 
        /* libinput doesn't export when it uses pressure detection, so we
         * need to reconstruct this here. Specifically, semi-mt devices are
@@ -1789,8 +1791,8 @@
        enum libinput_config_tap_button_map map = _i; /* ranged test */
        unsigned int button = 0;
 
-       if (libevdev_get_abs_maximum(dev->evdev,
-                                    ABS_MT_SLOT) > 2)
+       if (libevdev_get_abs_maximum(dev->evdev, ABS_MT_SLOT) > 2 ||
+           !libevdev_has_event_code(dev->evdev, EV_KEY, BTN_TOOL_TRIPLETAP))
                return;
 
        litest_enable_tap(dev->libinput_device);
@@ -1839,8 +1841,8 @@
        enum libinput_config_tap_button_map map = _i; /* ranged test */
        unsigned int button = 0;
 
-       if (libevdev_get_abs_maximum(dev->evdev,
-                                    ABS_MT_SLOT) > 2)
+       if (libevdev_get_abs_maximum(dev->evdev, ABS_MT_SLOT) > 2 ||
+           !libevdev_has_event_code(dev->evdev, EV_KEY, BTN_TOOL_TRIPLETAP))
                return;
 
        litest_enable_tap(dev->libinput_device);
@@ -1889,8 +1891,8 @@
        enum libinput_config_tap_button_map map = _i; /* ranged test */
        unsigned int button = 0;
 
-       if (libevdev_get_abs_maximum(dev->evdev,
-                                    ABS_MT_SLOT) > 2)
+       if (libevdev_get_abs_maximum(dev->evdev, ABS_MT_SLOT) > 2 ||
+           !libevdev_has_event_code(dev->evdev, EV_KEY, BTN_TOOL_TRIPLETAP))
                return;
 
        litest_enable_tap(dev->libinput_device);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libinput-1.13.1/test/test-touchpad.c 
new/libinput-1.13.2/test/test-touchpad.c
--- old/libinput-1.13.1/test/test-touchpad.c    2019-04-09 03:50:55.000000000 
+0200
+++ new/libinput-1.13.2/test/test-touchpad.c    2019-05-09 03:10:45.000000000 
+0200
@@ -2096,6 +2096,7 @@
        litest_assert_empty_queue(li);
 }
 END_TEST
+
 START_TEST(touchpad_left_handed)
 {
        struct litest_device *dev = litest_current_device();
@@ -2430,6 +2431,64 @@
 }
 END_TEST
 
+static inline bool
+touchpad_has_rotation(struct libevdev *evdev)
+{
+       return libevdev_get_id_vendor(evdev) == VENDOR_ID_WACOM;
+}
+
+START_TEST(touchpad_left_handed_rotation)
+{
+       struct litest_device *dev = litest_current_device();
+       struct libinput_device *d = dev->libinput_device;
+       struct libinput *li = dev->libinput;
+       enum libinput_config_status status;
+       struct libinput_event *event;
+       struct libinput_event_pointer *p;
+       bool rotate = touchpad_has_rotation(dev->evdev);
+
+       if (!libinput_device_config_left_handed_is_available(d))
+               return;
+
+       status = libinput_device_config_left_handed_set(d, 1);
+       ck_assert_int_eq(status, LIBINPUT_CONFIG_STATUS_SUCCESS);
+
+       litest_drain_events(li);
+
+       litest_touch_down(dev, 0, 20, 80);
+       litest_touch_move_to(dev, 0, 20, 80, 80, 20, 20);
+       litest_touch_up(dev, 0);
+       libinput_dispatch(li);
+
+       event = libinput_get_event(li);
+       ck_assert_notnull(event);
+       do {
+               double x, y, ux, uy;
+
+               p = litest_is_motion_event(event);
+
+               x = libinput_event_pointer_get_dx(p);
+               y = libinput_event_pointer_get_dy(p);
+               ux = libinput_event_pointer_get_dx_unaccelerated(p);
+               uy = libinput_event_pointer_get_dy_unaccelerated(p);
+
+               if (rotate) {
+                       ck_assert_double_lt(x, 0);
+                       ck_assert_double_gt(y, 0);
+                       ck_assert_double_lt(ux, 0);
+                       ck_assert_double_gt(uy, 0);
+               } else {
+                       ck_assert_double_gt(x, 0);
+                       ck_assert_double_lt(y, 0);
+                       ck_assert_double_gt(ux, 0);
+                       ck_assert_double_lt(uy, 0);
+               }
+
+               libinput_event_destroy(event);
+       } while ((event = libinput_get_event(li)));
+}
+END_TEST
+
 static void
 hover_continue(struct litest_device *dev, unsigned int slot,
               int x, int y)
@@ -7010,6 +7069,7 @@
        litest_add("touchpad:left-handed", touchpad_left_handed_tapping_2fg, 
LITEST_TOUCHPAD, LITEST_SINGLE_TOUCH);
        litest_add("touchpad:left-handed", touchpad_left_handed_delayed, 
LITEST_TOUCHPAD|LITEST_BUTTON, LITEST_CLICKPAD);
        litest_add("touchpad:left-handed", 
touchpad_left_handed_clickpad_delayed, LITEST_CLICKPAD, LITEST_APPLE_CLICKPAD);
+       litest_add("touchpad:left-handed", touchpad_left_handed_rotation, 
LITEST_TOUCHPAD, LITEST_ANY);
 
        /* Semi-MT hover tests aren't generic, they only work on this device and
         * ignore the semi-mt capability (it doesn't matter for the tests) */
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libinput-1.13.1/test/valgrind.suppressions 
new/libinput-1.13.2/test/valgrind.suppressions
--- old/libinput-1.13.1/test/valgrind.suppressions      2019-04-09 
03:50:55.000000000 +0200
+++ new/libinput-1.13.2/test/valgrind.suppressions      2019-05-09 
03:10:45.000000000 +0200
@@ -32,6 +32,13 @@
    fun:g_malloc0
 }
 {
+   <g_get_language_names_malloc>
+   Memcheck:Leak
+   fun:malloc
+   ...
+   fun:g_get_language_names_with_category
+}
+{
    libunwind:msync_uninitialized_bytes
    Memcheck:Param
    msync(start)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libinput-1.13.1/tools/test-tool-option-parsing.py 
new/libinput-1.13.2/tools/test-tool-option-parsing.py
--- old/libinput-1.13.1/tools/test-tool-option-parsing.py       2019-04-09 
03:50:55.000000000 +0200
+++ new/libinput-1.13.2/tools/test-tool-option-parsing.py       2019-05-09 
03:10:45.000000000 +0200
@@ -54,7 +54,7 @@
         # never get rc 2 (invalid usage)
         self.assertIn(rc, [0, 1])
 
-    def run_command_unrecognised_option(self, args):
+    def run_command_unrecognized_option(self, args):
         rc, stdout, stderr = self.run_command(args)
         self.assertEqual(rc, 2)
         self.assertTrue(stdout.startswith('Usage') or stdout == '')
@@ -66,7 +66,7 @@
         self.assertTrue(stdout.startswith('Usage') or stdout == '')
         self.assertIn('requires an argument', stderr)
 
-    def run_command_unrecognised_tool(self, args):
+    def run_command_unrecognized_tool(self, args):
         rc, stdout, stderr = self.run_command(args)
         self.assertEqual(rc, 2)
         self.assertTrue(stdout.startswith('Usage') or stdout == '')
@@ -89,16 +89,16 @@
         self.assertEqual(stderr, '')
 
     def test_invalid_arguments(self):
-        self.run_command_unrecognised_option(['--banana'])
-        self.run_command_unrecognised_option(['--foo'])
-        self.run_command_unrecognised_option(['--quiet'])
-        self.run_command_unrecognised_option(['--verbose'])
-        self.run_command_unrecognised_option(['--quiet', 'foo'])
+        self.run_command_unrecognized_option(['--banana'])
+        self.run_command_unrecognized_option(['--foo'])
+        self.run_command_unrecognized_option(['--quiet'])
+        self.run_command_unrecognized_option(['--verbose'])
+        self.run_command_unrecognized_option(['--quiet', 'foo'])
 
     def test_invalid_tools(self):
-        self.run_command_unrecognised_tool(['foo'])
-        self.run_command_unrecognised_tool(['debug'])
-        self.run_command_unrecognised_tool(['foo', '--quiet'])
+        self.run_command_unrecognized_tool(['foo'])
+        self.run_command_unrecognized_tool(['debug'])
+        self.run_command_unrecognized_tool(['foo', '--quiet'])
 
 
 class TestToolWithOptions(object):
@@ -183,9 +183,9 @@
         self.assertEqual(rc, 0)
 
     def test_invalid_arguments(self):
-        self.run_command_unrecognised_option(['--banana'])
-        self.run_command_unrecognised_option(['--foo'])
-        self.run_command_unrecognised_option(['--version'])
+        self.run_command_unrecognized_option(['--banana'])
+        self.run_command_unrecognized_option(['--foo'])
+        self.run_command_unrecognized_option(['--version'])
 
 
 class TestDebugGUI(TestToolWithOptions, TestLibinputTool):
@@ -201,10 +201,10 @@
         self.assertEqual(rc, 0)
 
     def test_invalid_arguments(self):
-        self.run_command_unrecognised_option(['--quiet'])
-        self.run_command_unrecognised_option(['--banana'])
-        self.run_command_unrecognised_option(['--foo'])
-        self.run_command_unrecognised_option(['--version'])
+        self.run_command_unrecognized_option(['--quiet'])
+        self.run_command_unrecognized_option(['--banana'])
+        self.run_command_unrecognized_option(['--foo'])
+        self.run_command_unrecognized_option(['--version'])
 
 
 if __name__ == '__main__':


Reply via email to