Hello community, here is the log from the commit of package libinput for openSUSE:Factory checked in at 2018-04-17 11:11:05 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/libinput (Old) and /work/SRC/openSUSE:Factory/.libinput.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "libinput" Tue Apr 17 11:11:05 2018 rev:59 rq:595279 version:1.10.4 Changes: -------- --- /work/SRC/openSUSE:Factory/libinput/libinput.changes 2018-03-20 21:53:13.369101175 +0100 +++ /work/SRC/openSUSE:Factory/.libinput.new/libinput.changes 2018-04-17 11:11:08.092370567 +0200 @@ -1,0 +2,15 @@ +Tue Apr 10 01:35:22 UTC 2018 - [email protected] + +- Update to version 1.10.4: + * Biggest user-noticeable change is that the hysteresis threshold + is significantly reduced to 0.25 of a mm now or to the kernel + fuzz value where present. This should make touchpads a bit more + snappy. + * Two fixes for touchpad touch handling, one affecting semi-mt + devices with hovering capability and one affecting the Apple + touchpads where a touch can get erroneously detected as as + exceeding the speed thesholds. + * The rest - documentation and tool fixes. Nandor's udev fix + fixes a race condition in the test suite. + +------------------------------------------------------------------- Old: ---- libinput-1.10.3.tar.xz libinput-1.10.3.tar.xz.sig New: ---- libinput-1.10.4.tar.xz libinput-1.10.4.tar.xz.sig ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ libinput.spec ++++++ --- /var/tmp/diff_new_pack.6qAHNL/_old 2018-04-17 11:11:08.816336604 +0200 +++ /var/tmp/diff_new_pack.6qAHNL/_new 2018-04-17 11:11:08.820336416 +0200 @@ -18,7 +18,7 @@ Name: libinput %define lname libinput10 -Version: 1.10.3 +Version: 1.10.4 Release: 0 Summary: Input device and event processing library License: MIT ++++++ libinput-1.10.3.tar.xz -> libinput-1.10.4.tar.xz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libinput-1.10.3/meson.build new/libinput-1.10.4/meson.build --- old/libinput-1.10.3/meson.build 2018-03-14 06:34:05.000000000 +0100 +++ new/libinput-1.10.4/meson.build 2018-04-09 06:53:52.000000000 +0200 @@ -1,5 +1,5 @@ project('libinput', 'c', 'cpp', - version : '1.10.3', + version : '1.10.4', license : 'MIT/Expat', default_options : [ 'c_std=gnu99', 'warning_level=2' ], meson_version : '>= 0.40.0') diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libinput-1.10.3/src/evdev-mt-touchpad.c new/libinput-1.10.4/src/evdev-mt-touchpad.c --- old/libinput-1.10.3/src/evdev-mt-touchpad.c 2018-03-14 06:34:05.000000000 +0100 +++ new/libinput-1.10.4/src/evdev-mt-touchpad.c 2018-04-09 06:53:52.000000000 +0200 @@ -1147,8 +1147,12 @@ tp_begin_touch(tp, t, time); } /* don't unhover for pressure if we have too many - * fake fingers down, see comment below */ - } else if (nfake_touches <= tp->num_slots) { + * fake fingers down, see comment below. Except + * for single-finger touches where the real touch + * decides for the rest. + */ + } else if (nfake_touches <= tp->num_slots || + tp->num_slots == 1) { if (t->pressure < tp->pressure.low) { evdev_log_debug(tp->device, "pressure: end touch\n"); @@ -1485,6 +1489,9 @@ want_motion_reset = tp_need_motion_history_reset(tp); tp_for_each_touch(tp, t) { + if (t->state == TOUCH_NONE) + continue; + if (want_motion_reset) { tp_motion_history_reset(t); t->quirks.reset_motion_history = true; @@ -2782,7 +2789,7 @@ edges = evdev_device_mm_to_units(device, &mm); tp->palm.right_edge = edges.x; - if (!tp->buttons.has_topbuttons) { + if (!tp->buttons.has_topbuttons && height > 55) { /* top edge is 5% of the height */ mm.y = height * 0.05; edges = evdev_device_mm_to_units(device, &mm); @@ -3022,12 +3029,22 @@ static inline void tp_init_hysteresis(struct tp_dispatch *tp) { - int res_x, res_y; + int xmargin, ymargin; + const struct input_absinfo *ax = tp->device->abs.absinfo_x, + *ay = tp->device->abs.absinfo_y; - res_x = tp->device->abs.absinfo_x->resolution; - res_y = tp->device->abs.absinfo_y->resolution; - tp->hysteresis.margin.x = res_x/2; - tp->hysteresis.margin.y = res_y/2; + if (ax->fuzz) + xmargin = ax->fuzz; + else + xmargin = ax->resolution/4; + + if (ay->fuzz) + ymargin = ay->fuzz; + else + ymargin = ay->resolution/4; + + tp->hysteresis.margin.x = xmargin; + tp->hysteresis.margin.y = ymargin; tp->hysteresis.enabled = false; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libinput-1.10.3/src/libinput.h new/libinput-1.10.4/src/libinput.h --- old/libinput-1.10.3/src/libinput.h 2018-03-14 06:34:05.000000000 +0100 +++ new/libinput-1.10.4/src/libinput.h 2018-04-09 06:53:52.000000000 +0200 @@ -4325,7 +4325,7 @@ * * @see libinput_device_config_calibration_has_matrix * @see libinput_device_config_calibration_set_matrix - * @see libinput_device_config_calibration_get_default_matrix + * @see libinput_device_config_calibration_get_matrix */ int libinput_device_config_calibration_get_default_matrix(struct libinput_device *device, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libinput-1.10.3/src/udev-seat.c new/libinput-1.10.4/src/udev-seat.c --- old/libinput-1.10.3/src/udev-seat.c 2018-03-14 06:34:05.000000000 +0100 +++ new/libinput-1.10.4/src/udev-seat.c 2018-04-09 06:53:52.000000000 +0200 @@ -150,6 +150,17 @@ continue; } + /* Skip unconfigured device. udev will send an event + * when device is fully configured */ + if (!udev_device_get_is_initialized(device)) { + log_debug(&input->base, + "%-7s - skip unconfigured input device '%s'\n", + sysname, + udev_device_get_devnode(device)); + udev_device_unref(device); + continue; + } + if (device_added(device, input, NULL) < 0) { udev_device_unref(device); udev_enumerate_unref(e); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libinput-1.10.3/test/test-touchpad-tap.c new/libinput-1.10.4/test/test-touchpad-tap.c --- old/libinput-1.10.3/test/test-touchpad-tap.c 2018-03-14 06:34:05.000000000 +0100 +++ new/libinput-1.10.4/test/test-touchpad-tap.c 2018-04-09 06:53:52.000000000 +0200 @@ -1619,7 +1619,11 @@ litest_touch_move_to(dev, 1, 70, 50, 50, 70, 10, 0); litest_drain_events(li); - /* drop below the pressure threshold in the same frame as starting a */ + /* drop below the pressure threshold in the same frame as starting a + * third touch, see + * E: 8713.954784 0001 014e 0001 # EV_KEY / BTN_TOOL_TRIPLETAP 1 + * in https://bugs.freedesktop.org/attachment.cgi?id=137672 + */ litest_event(dev, EV_ABS, ABS_MT_PRESSURE, 3); litest_event(dev, EV_ABS, ABS_PRESSURE, 3); litest_event(dev, EV_KEY, BTN_TOOL_DOUBLETAP, 0); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libinput-1.10.3/test/test-touchpad.c new/libinput-1.10.4/test/test-touchpad.c --- old/libinput-1.10.3/test/test-touchpad.c 2018-03-14 06:34:05.000000000 +0100 +++ new/libinput-1.10.4/test/test-touchpad.c 2018-04-09 06:53:52.000000000 +0200 @@ -953,7 +953,7 @@ } END_TEST -static int +static bool touchpad_has_palm_detect_size(struct litest_device *dev) { double width, height; @@ -975,6 +975,20 @@ return rc == 0 && width >= 70; } +static bool +touchpad_has_top_palm_detect_size(struct litest_device *dev) +{ + double width, height; + int rc; + + if (!touchpad_has_palm_detect_size(dev)) + return false; + + rc = libinput_device_get_size(dev->libinput_device, &width, &height); + + return rc == 0 && height > 55; +} + START_TEST(touchpad_palm_detect_at_edge) { struct litest_device *dev = litest_current_device(); @@ -1009,7 +1023,7 @@ struct litest_device *dev = litest_current_device(); struct libinput *li = dev->libinput; - if (!touchpad_has_palm_detect_size(dev)) + if (!touchpad_has_top_palm_detect_size(dev)) return; litest_disable_tap(dev->libinput_device); @@ -1131,7 +1145,7 @@ struct litest_device *dev = litest_current_device(); struct libinput *li = dev->libinput; - if (!touchpad_has_palm_detect_size(dev)) + if (!touchpad_has_top_palm_detect_size(dev)) return; litest_disable_tap(dev->libinput_device); @@ -1178,7 +1192,7 @@ struct litest_device *dev = litest_current_device(); struct libinput *li = dev->libinput; - if (!touchpad_has_palm_detect_size(dev)) + if (!touchpad_has_top_palm_detect_size(dev)) return; litest_disable_tap(dev->libinput_device); @@ -1231,7 +1245,7 @@ struct litest_device *dev = litest_current_device(); struct libinput *li = dev->libinput; - if (!touchpad_has_palm_detect_size(dev)) + if (!touchpad_has_top_palm_detect_size(dev)) return; litest_disable_tap(dev->libinput_device); @@ -1260,7 +1274,7 @@ struct litest_device *dev = litest_current_device(); struct libinput *li = dev->libinput; - if (!touchpad_has_palm_detect_size(dev)) + if (!touchpad_has_top_palm_detect_size(dev)) return; litest_enable_tap(dev->libinput_device); @@ -4473,6 +4487,43 @@ } END_TEST +START_TEST(touchpad_thumb_moving_empty_slots) +{ + struct litest_device *dev = litest_current_device(); + struct libinput *li = dev->libinput; + + litest_disable_tap(dev->libinput_device); + litest_enable_2fg_scroll(dev); + + if (libevdev_get_num_slots(dev->evdev) < 3) + return; + + litest_drain_events(li); + + /* exceed the speed movement threshold in slot 0 */ + litest_touch_down(dev, 0, 50, 20); + litest_touch_move_to(dev, 0, 50, 20, 70, 99, 15, 0); + litest_touch_up(dev, 0); + + litest_drain_events(li); + + /* scroll in slots 1 and 2 */ + litest_touch_down(dev, 1, 50, 50); + litest_touch_down(dev, 2, 90, 50); + libinput_dispatch(li); + for (int i = 0, y = 50; i < 10; i++, y++) { + litest_touch_move_to(dev, 1, 50, y, 50, y + 1, 1, 0); + litest_touch_move_to(dev, 2, 50, y, 50, y + 1, 1, 0); + } + libinput_dispatch(li); + litest_touch_up(dev, 1); + litest_touch_up(dev, 2); + libinput_dispatch(li); + litest_assert_scroll(li, LIBINPUT_POINTER_AXIS_SCROLL_VERTICAL, 2); + +} +END_TEST + START_TEST(touchpad_thumb_clickfinger) { struct litest_device *dev = litest_current_device(); @@ -5489,6 +5540,45 @@ } END_TEST +START_TEST(touchpad_pressure_semi_mt_2fg_goes_light) +{ + struct litest_device *dev = litest_current_device(); + struct libinput *li = dev->libinput; + struct axis_replacement axes[] = { + { ABS_PRESSURE, 2 }, + { -1, 0 } + }; + + litest_enable_2fg_scroll(dev); + litest_drain_events(li); + + litest_touch_down(dev, 0, 40, 50); + litest_touch_down(dev, 1, 60, 50); + litest_touch_move_two_touches(dev, 40, 50, 60, 50, 0, -20, 10, 0); + + /* This should trigger a scroll end event */ + litest_push_event_frame(dev); + litest_touch_move_extended(dev, 0, 40, 31, axes); + litest_touch_move_extended(dev, 1, 60, 31, axes); + litest_pop_event_frame(dev); + libinput_dispatch(li); + + litest_assert_scroll(li, LIBINPUT_POINTER_AXIS_SCROLL_VERTICAL, 0); + + litest_push_event_frame(dev); + litest_touch_move_extended(dev, 0, 40, 35, axes); + litest_touch_move_extended(dev, 1, 60, 35, axes); + litest_pop_event_frame(dev); + + litest_push_event_frame(dev); + litest_touch_move_extended(dev, 0, 40, 40, axes); + litest_touch_move_extended(dev, 1, 60, 40, axes); + litest_pop_event_frame(dev); + libinput_dispatch(li); + litest_assert_empty_queue(li); +} +END_TEST + static inline bool touchpad_has_touch_size(struct litest_device *dev) { @@ -5845,6 +5935,7 @@ litest_add("touchpad:thumb", touchpad_thumb_begin_no_motion, LITEST_CLICKPAD, LITEST_ANY); litest_add("touchpad:thumb", touchpad_thumb_update_no_motion, LITEST_CLICKPAD, LITEST_ANY); litest_add("touchpad:thumb", touchpad_thumb_moving, LITEST_CLICKPAD, LITEST_ANY); + litest_add("touchpad:thumb", touchpad_thumb_moving_empty_slots, LITEST_TOUCHPAD, LITEST_SINGLE_TOUCH); litest_add("touchpad:thumb", touchpad_thumb_clickfinger, LITEST_CLICKPAD, LITEST_ANY); litest_add("touchpad:thumb", touchpad_thumb_btnarea, LITEST_CLICKPAD, LITEST_ANY); litest_add("touchpad:thumb", touchpad_thumb_tap_begin, LITEST_CLICKPAD, LITEST_ANY); @@ -5873,6 +5964,7 @@ litest_add("touchpad:pressure", touchpad_pressure_tap_2fg, LITEST_TOUCHPAD, LITEST_ANY); litest_add("touchpad:pressure", touchpad_pressure_tap_2fg_1fg_light, LITEST_TOUCHPAD, LITEST_SINGLE_TOUCH); litest_add("touchpad:pressure", touchpad_pressure_btntool, LITEST_TOUCHPAD, LITEST_SINGLE_TOUCH); + litest_add("touchpad:pressure", touchpad_pressure_semi_mt_2fg_goes_light, LITEST_SEMI_MT, LITEST_ANY); litest_add("touchpad:touch-size", touchpad_touch_size, LITEST_APPLE_CLICKPAD, LITEST_ANY); litest_add("touchpad:touch-size", touchpad_touch_size_2fg, LITEST_APPLE_CLICKPAD, LITEST_ANY); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libinput-1.10.3/tools/libinput-debug-events.man new/libinput-1.10.4/tools/libinput-debug-events.man --- old/libinput-1.10.3/tools/libinput-debug-events.man 2018-03-14 06:34:05.000000000 +0100 +++ new/libinput-1.10.4/tools/libinput-debug-events.man 2018-04-09 06:53:52.000000000 +0200 @@ -68,7 +68,7 @@ .B \-\-enable\-dwt|\-\-disable\-dwt Enable or disable disable-while-typing .TP 8 -.B \-\-set\-click\-method=[none|clickfinger|buttons] +.B \-\-set\-click\-method=[none|clickfinger|buttonareas] Set the desired click method .TP 8 .B \-\-set\-scroll\-method=[none|twofinger|edge|button] diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libinput-1.10.3/tools/libinput-measure-touchpad-pressure new/libinput-1.10.4/tools/libinput-measure-touchpad-pressure --- old/libinput-1.10.3/tools/libinput-measure-touchpad-pressure 2018-03-14 06:34:05.000000000 +0100 +++ new/libinput-1.10.4/tools/libinput-measure-touchpad-pressure 2018-04-09 06:53:52.000000000 +0200 @@ -163,8 +163,8 @@ prange = p.max - p.min # libinput defaults - self.up = int(p.min + 0.12 * prange) - self.down = int(p.min + 0.10 * prange) + self.down = int(p.min + 0.12 * prange) + self.up = int(p.min + 0.10 * prange) self.palm = 130 # the libinput default self._init_thresholds_from_udev() @@ -189,7 +189,7 @@ ud = pyudev.Devices.from_device_file(context, self.path) v = ud.get('LIBINPUT_ATTR_PRESSURE_RANGE') if v: - self.up, self.down = colon_tuple(v) + self.down, self.up = colon_tuple(v) v = ud.get('LIBINPUT_ATTR_PALM_PRESSURE_THRESHOLD') if v:
