1. 03 Jun, 2020 1 commit
  2. 13 Feb, 2020 1 commit
  3. 12 Feb, 2020 1 commit
    • Peter Hutterer's avatar
      test: add a test case for checking EVDEV_ABS overrides · 0dcb02d3
      Peter Hutterer authored
      Problem: it's still not a 100% check because the way real udev handles the
      EVDEV_ABS overrides ignores any that are set through udev properties only. So
      we manually have to trigger the keyboard builtin for our test device which
      can give us false positives (e.g. it wouldn't have detected #424). But still,
      it'll alert us if the actual overridden values are different to what we
      Signed-off-by: Peter Hutterer's avatarPeter Hutterer <peter.hutterer@who-t.net>
  4. 02 Feb, 2020 2 commits
  5. 29 Jan, 2020 2 commits
  6. 04 Jan, 2020 1 commit
    • Michael Forney's avatar
      litest: Fix warnings about discarded qualifiers with check-0.13.0 · 25a940a5
      Michael Forney authored
      check 0.13.0 introduced a new struct type TTest for test functions
      instead of just a function. However, now the tcase_add_* functions use
      `const Ttest *`, and since litest stores the test case in a `void *`,
      we get warnings like the following:
      ../test/test-touchpad.c:7079:30: warning: passing argument 3 of '_litest_add' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
        litest_add("touchpad:fuzz", touchpad_fuzz, LITEST_TOUCHPAD, LITEST_ANY);
      To fix this, use `const void *`, which is compatible with both APIs.
      Signed-off-by: Michael Forney's avatarMichael Forney <mforney@mforney.org>
  7. 04 Dec, 2019 1 commit
    • Peter Hutterer's avatar
      pad: add LIBINPUT_EVENT_TABLET_PAD_KEY for pad keys · 2d1bcf98
      Peter Hutterer authored
      The Wacom Cintiq 24HD and later tablets send specific key events for
      hardware/soft buttons. KEY_PROG1..KEY_PROG3 on earlier tablets,
      We ignore KEY_PROG1-3 because starting with kernel 5.4 older tablets will too
      use the better-named #defines.
      These differ from pad buttons as the key code in itself carries semantic
      information, so we should pass them on as-is instead of mapping them to
      meaningless 0-indexed buttons like we do on the other buttons.
      So let's add a new event, LIBINPUT_EVENT_TABLET_PAD_KEY and the associated
      functions to handle that case.
      Pad keys have a fixed hw-defined semantic meaning and are thus not part of
      a tablet mode group.
      Signed-off-by: Peter Hutterer's avatarPeter Hutterer <peter.hutterer@who-t.net>
  8. 15 Nov, 2019 1 commit
    • Peter Hutterer's avatar
      touchpad: don't allow for multifinger tapping after a move · 27161626
      Peter Hutterer authored
      In the current implementation, movements > threshold and timeouts usually move
      to HOLD state and continue from there. Where a finger is lifted, we go back
      up the diagram into the previous finger count's HOLD state.
      The side-effect of this is that a tap of a finger can be counted as tap even
      after a movement:
      - two fingers down, move to scroll, hold down
      - third finger down, third finger up
      This sequence triggers an erroneous three-finger tap. Once the motion
      threshold is hit by any touch, no finger must trigger 2/3 finger tap events
      while any touch is down.
      The false tap is only triggered where the new finger can execute a tap without
      any other finger changing any property. This can be triggered on the
      reporter's Dell Precision 5520 but on most other touchpads, a new finger down
      will trigger slight movement, pressure or touch size updates and thus the bug
      cannot be triggered.
      Fixes #382Signed-off-by: Peter Hutterer's avatarPeter Hutterer <peter.hutterer@who-t.net>
  9. 17 Oct, 2019 1 commit
    • Peter Hutterer's avatar
      Add a scroll button lock feature · 63f99230
      Peter Hutterer authored
      Scroll button locking is an accessibility feature. When enabled, the scroll
      button does not need to be held down, the first click holds it logically down,
      to be released on the second click of that same button.
      This is implemented as simple event filter, so we still get the same behavior
      from the emulated logical button, i.e. a physical double click results in a
      single logical click of that button provided no scrolling was triggered.
      Signed-off-by: Peter Hutterer's avatarPeter Hutterer <peter.hutterer@who-t.net>
  10. 16 Jul, 2019 1 commit
    • Matt Mayfield's avatar
      touchpad: revamp thumb detection · 4536b5b3
      Matt Mayfield authored
      Instead of a simple yes/no/maybe for thumbs, have a more extensive state
      machine that keeps track of the thumb. Since we only support one thumb anyway,
      the tracking moves to the tp_dispatch struct.
      Test case changes:
        with better thumb detection we can now handle this properly and expect a
        right button (2fg) press for the test case
        two thumbs are now always two fingers, so let's switch to axis events here
      Signed-off-by: Peter Hutterer's avatarPeter Hutterer <peter.hutterer@who-t.net>
  11. 07 Jul, 2019 1 commit
  12. 17 Jun, 2019 1 commit
  13. 13 Jun, 2019 1 commit
  14. 07 Jun, 2019 2 commits
    • Peter Hutterer's avatar
      Add a new dispatch interface for the Dell Canvas Totem · bf427762
      Peter Hutterer authored
      This device looks similar to a MT device on the kernel side, but it's not a
      MT device and it's not quite a tablet either. It uses slots to track up to 4
      totems off the same device and the only hint that it's not a MT device is that
      it sends ABS_MT_TOOL_TYPE / MT_TOOL_DIAL.
      udev thinks it's a touchscreen and a tablet but we currently init those
      devices as touchscreen (because all wacom tablet touch devices are udev
      tablets+tochscreens). So we need a quirk to hook onto this device.
      And we use a completely separate dispatch implementation, because adding the
      behavior to the tablet interface requires so many exceptions that it's easier
      to just add a separate dispatch interface.
      Signed-off-by: Peter Hutterer's avatarPeter Hutterer <peter.hutterer@who-t.net>
    • Peter Hutterer's avatar
      test: force the litest feature enum to be 8 bytes or more · 52e86f4b
      Peter Hutterer authored
      We've used up all bits, so let's extend the enum. (1 << 31) triggers an
      assertion because we check for > LITEST_DEVICELESS. So we can't use that bit
      without other changes.
      Signed-off-by: Peter Hutterer's avatarPeter Hutterer <peter.hutterer@who-t.net>
  15. 02 Apr, 2019 1 commit
  16. 14 Mar, 2019 2 commits
  17. 13 Feb, 2019 1 commit
  18. 11 Feb, 2019 1 commit
  19. 31 Jan, 2019 2 commits
    • Peter Hutterer's avatar
      tablet: add tilt-based touch arbitration for screen tablets · f612c1ef
      Peter Hutterer authored
      If the tilt angle on tip down is not 0 set the touch arbitration to a
      rectangle around the assumed position of the hand. This assumed position is
      right of the tip for a rightwards tilt and left of the tip for a leftwards
      tilt (i.e. left-handed mode). The rectangle is 200x200mm with a 20x50mm
      NW of the tip or NE for left-handed. In other words, if the period below is
      the tip, the rectangle looks like this:
          +-----------+                          +-----------+
          | . 	| <- for rightwards tilt   |         . |
          |           |                          |           |
          |           |                          |           |
          |           |    for leftwards tilt -> |           |
          +-----------+                          +-----------+
      Touches within that rectangle are canceled, new touches are ignored. As the
      tip moves around the rectangle is updated but touches are only cancelled on
      the original tip down. While the tip is down, new touches are ignored in the
      exclusion area but pre-existing touches are not cancelled.
      This is currently only implemented in the fallback interface, i.e. it will
      only work for Cintiqs.
      Signed-off-by: Peter Hutterer's avatarPeter Hutterer <peter.hutterer@who-t.net>
    • Peter Hutterer's avatar
      test: add a LITEST_DIRECT feature for the wacom cintiqs · 794bff8a
      Peter Hutterer authored
      Currently unused, but will be used in later patches
      Signed-off-by: Peter Hutterer's avatarPeter Hutterer <peter.hutterer@who-t.net>
  20. 18 Jan, 2019 1 commit
  21. 04 Jan, 2019 1 commit
  22. 04 Oct, 2018 1 commit
    • Peter Hutterer's avatar
      touchpad: avoid motion events when moving one finger into AREA · df1f6ba4
      Peter Hutterer authored
      If a 2fg scroll motion starts with both fingers in the bottom button area and
      one finger moves into the main area before the other, we used to send motion
      events for that finger. Once the second finger moved into the main area the
      scroll was detected correctly but by then the cursor may have moved out of the
      intended focus area.
      We have two transitions where we may start sending motion events: when we move
      out of the bottom area and when the finger moves by more than 5mm within the
      button area. In both cases, check for any touches that are in the
      bottom area and started at the 'same' time as our moving touch. Mark those as
      'moved' to release them for gestures so we get the right finger count and
      axis/gesture events instead of just motion events.
      Signed-off-by: Peter Hutterer's avatarPeter Hutterer <peter.hutterer@who-t.net>
  23. 03 Oct, 2018 1 commit
  24. 28 Aug, 2018 1 commit
    • Peter Hutterer's avatar
      test: drop the sleep_ms argument · 7768d7d9
      Peter Hutterer authored
      This forces events for every ~10ms now. If we want a slower movement, we need
      more steps - just like a real touchpad does it.
      Cocinelle spatch files were variants of:
      	expression A, B, C, D, E, F, G, H, I, J, K;
      	- litest_touch_move_two_touches(A, B, C, D, E, F, G, H, I)
      	+ litest_touch_move_two_touches(A, B, C, D, E, F, G, H)
      The only test that needed a real fix was touchpad_no_palm_detect_2fg_scroll,
      it used 12ms before, now it's using 10ms so on the bcm5974 touchpad the second
      finger was a speed-thumb. Increasing the events and thus slowing down the
      pointer means it's a normal finger and the test succeeds again.
      Signed-off-by: Peter Hutterer's avatarPeter Hutterer <peter.hutterer@who-t.net>
  25. 09 Aug, 2018 1 commit
  26. 03 Aug, 2018 2 commits
  27. 16 Jul, 2018 1 commit
    • myfreeweb's avatar
      test: use simple portable sendfile · 8cc4de5f
      myfreeweb authored
      There's no need for high performance in these little tests, so instead of
      supporting various platform-specific sendfile() implementations, just use a local read-write function.
  28. 26 Jun, 2018 1 commit
  29. 08 Jun, 2018 1 commit
  30. 18 May, 2018 1 commit
  31. 16 May, 2018 1 commit
  32. 16 Apr, 2018 1 commit
  33. 23 Mar, 2018 1 commit
  34. 21 Feb, 2018 1 commit
    • Peter Hutterer's avatar
      touchpad: delay arbitration by 90ms after touch toggle · 2a378bea
      Peter Hutterer authored
      When drawing on a tablet, the hand usually rests on the device, causing touch
      events. The kernel arbitrates for us in most cases, so we get a touch up
      and no events while the stylus is in proximity. When lifting the hand off in a
      natural position, the hand still touches the device when the pen goes out of
      proximity. This is 'immediately' followed by the hand lifting off the device.
      When kernel pen/touch arbitration is active, the pen proximity out causes a
      touch begin for the hand still on the pad. This is followed by a touch up when
      the hand lifts which happens to look exactly like a tap-to-click.
      Fix this by delaying the 'arbitration is now off' toggle, causing any touch
      that starts immediately after proximity out to be detected as palm and
      ignored for its lifetime.
      https://bugs.freedesktop.org/show_bug.cgi?id=104985Signed-off-by: Peter Hutterer's avatarPeter Hutterer <peter.hutterer@who-t.net>