summaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)AuthorFilesLines
2016-08-25buildsystem: add missing uninstalled pkg-config infrauninstalledReynaldo H. Verdejo Pinochet1-0/+10
Signed-off-by: Reynaldo H. Verdejo Pinochet <reynaldo@osg.samsung.com>
2016-08-23touchpad: reset the edge scroll state on touch up if edge scroll is disabledPeter Hutterer1-0/+3
If a touch was down (and up again) before the device was switched to edge scrolling, libinput reported an error message: litest error: libinput bug: unexpected scroll event 0 in area state While edge scrolling was disabled, any new touch would be set to the area state but it was never reset on touch release. https://bugs.freedesktop.org/show_bug.cgi?id=97425 Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Hans de Goede <hdegoede@redhat.com>
2016-08-22Read the horizontal wheel click angle property if availablePeter Hutterer4-23/+49
The Logitech MX master has different click angles for the two wheels. https://github.com/systemd/systemd/issues/3947 Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Hans de Goede <hdegoede@redhat.com>
2016-08-19touchpad: on a non-clickpad, reset the motion history on nfingers changePeter Hutterer1-2/+5
The only reason to have more than one finger on a non-clickpad is to tap, scroll or gesture. In all cases resetting the motion history is a good idea to avoid jumps moving from 2 to 1 finger. https://bugs.freedesktop.org/show_bug.cgi?id=97194 Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Hans de Goede <hdegoede@redhat.com>
2016-08-15touchpad: implement configurable button mapping for tappingPeter Hutterer3-8/+50
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Hans de Goede <hdegoede@redhat.com>
2016-08-15Add configurable button map to tappingsPeter Hutterer5-0/+151
The previously hardcoded button map for tapping is 1/2/3 to LRM. But the middle button is a common feature on the desktop (used for paste, most prominently) and three-finger tapping is almost impossible to do reliably on some touchpads (e.g. the T440 has a recognition rate of ~1 in 5). Left and right buttons have a prominent physical position (either softbuttons or physical buttons) so make the tap order configurable. Those that require middle buttons reliably can use the [software] buttons for left/right and 2-finger tap for a middle button. https://bugs.freedesktop.org/show_bug.cgi?id=96962 Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Hans de Goede <hdegoede@redhat.com>
2016-08-15doc: split middle button emulation into a separate pagePeter Hutterer1-16/+7
Easier to link to from bug reports Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2016-08-11evdev: rename all fallback-specific functions to a fallback_ prefixPeter Hutterer1-66/+66
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2016-08-11evdev: pass the dispatch interface aroundPeter Hutterer1-36/+38
The only places we should typecast from device->dispatch is where we have external entry points. Everywhere else keep the pointer to the dispatch interface we already have anyway. This way we avoid papering over a potential re-use of a function from non-evdev code, passing in the wrong dispatch. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2016-08-11evdev: move the abs point into the fallback dispatchPeter Hutterer2-15/+27
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2016-08-11evdev: switch three ints to booleansPeter Hutterer4-15/+16
And a minor rename to make it more obvious Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2016-08-11evdev: reshuffle the evdev_device struct fieldsPeter Hutterer1-14/+10
Have the ungrouped items at the top of the struct for better visibility. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2016-08-11evdev: split evdev_dispatch and fallback_dispatch into separate entitiesPeter Hutterer4-44/+58
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2016-08-11evdev: move the keyboard mask into the fallback dispatchPeter Hutterer2-27/+31
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2016-08-11evdev: move pending_event to the evdev_dispatch structPeter Hutterer2-24/+31
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2016-08-11evdev: move the relative deltas for normal devices to the fallback dispatchPeter Hutterer2-16/+24
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2016-08-11evdev: move the mt struct into the evdev dispatch structPeter Hutterer2-40/+49
This is only used by the fallback dispatch method, not by any of the others. Anything dispatch-specific should go into that struct. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2016-08-11evdev: move axis dimension handling into a single helper functionPeter Hutterer1-21/+23
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2016-08-11evdev: split out slot initPeter Hutterer1-58/+73
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2016-08-11evdev: return the dispatch method from evdev_configure_devicePeter Hutterer1-24/+19
Rather than setting a magic device field and returning true/false just return the dispatch method. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2016-08-11evdev: move the fallback dispatch creation to evdev_configure_devicePeter Hutterer1-3/+2
All the other devices are created in there too, unify that approach. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2016-08-05gestures: reduce the 2fg scroll timeout to 150msPeter Hutterer1-1/+1
This timeout is there to switch to scrolling when the fingers rest on the touchpad unmoving and thus avoids the initial scroll threshold for slow scrolls. Since the only other gestures we support are swipe (usually a fast movement) and pinch-and-rotate (also a fast movement) we can drop the timeout down significantly and thus make the scroll feel more reactive. https://bugs.freedesktop.org/show_bug.cgi?id=93504 Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Hans de Goede <hdegoede@redhat.com>
2016-08-05touchpad: ignore modifier key combos for dwtPeter Hutterer2-6/+30
Inspired by the syndaemon -K switch and Anton Lindqvist's patch. https://patchwork.freedesktop.org/patch/102417/ We already ignored modifiers for dwt. Now we also ignore modifier + key combinations, i.e. hitting Ctrl+s to save does not trigger dwt, the touchpad remains immediately usable. However, if dwt is already active and a modifier combination is pressed, dwt remains active, i.e. while typing, a shift + key does not disable dwt. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Hans de Goede <hdegoede@redhat.com>
2016-08-02Include config.h from libinput-util.hPeter Hutterer1-0/+2
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2016-08-02evdev: fix typo "device device"Peter Hutterer1-3/+3
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2016-08-01touchpad: use the udev ID_INPUT_TOUCHPAD_INTEGRATION property if availablePeter Hutterer1-0/+18
udev now labels touchpads as "internal" or "external" for us, use that value where available and only fall back onto our own labelling if it's missing or unknown. systemd commit: https://github.com/systemd/systemd/pull/3638 https://bugs.freedesktop.org/show_bug.cgi?id=96735 Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2016-08-01touchpad: change manual calculations of dimensions to helper functionsPeter Hutterer3-60/+71
Wherever we use an absolute size in mm on the touchpad, switch to the new helper functions. In a few cases we only need one coordinate so just leave the other one as 0 in those cases. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Hans de Goede <hdegoede@redhat.com>
2016-08-01evdev: add helper functions to convert between units and mmPeter Hutterer2-0/+61
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Hans de Goede <hdegoede@redhat.com>
2016-07-22evdev: prefix "tablet unknown to libwacom" error with the device namePeter Hutterer1-1/+3
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2016-07-20touchpad: change the sanity check function to a boolPeter Hutterer1-7/+7
And rename to make the return value more obvious Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Yong Bakos <ybakos@humanoriented.com> Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
2016-07-20touchpad: change palm detection trigger functions to boolsPeter Hutterer1-13/+15
And rename to make it more obvious what the return value means. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Yong Bakos <ybakos@humanoriented.com> Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
2016-07-20touchpad: change clickfinger check distance function to a boolPeter Hutterer1-7/+7
And rename to make it more obvious what the return value will mean. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Yong Bakos <ybakos@humanoriented.com> Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
2016-07-20Switch a bunch of internal functions from int to boolPeter Hutterer9-74/+74
All these effectively returned bools anyway, switch the signature over to be less ambiguous. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Yong Bakos <ybakos@humanoriented.com> Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
2016-07-20Change a few functions that only ever returned 0 to voidsPeter Hutterer9-105/+52
These are internal functions, if we need them to return an error code we can change that at any time. Meanwhile, if we only ever return 0 anyway we might as well just make them voids to save on error paths. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Yong Bakos <ybakos@humanoriented.com> Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
2016-07-19evdev_device_suspend() is a void functionPeter Hutterer2-4/+2
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Yong Bakos <ybakos@humanoriented.com> Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
2016-07-19touchpad: whitespace fixPeter Hutterer1-1/+1
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2016-07-18touchpad: change offset ints to device_coordsPeter Hutterer1-15/+15
No functional changes, just makes the unit more explicit Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Hans de Goede <hdegoede@redhat.com>
2016-07-18evdev: constify evdev_device_get_sizePeter Hutterer2-2/+2
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Hans de Goede <hdegoede@redhat.com>
2016-07-15touchpad: don't init a horizontal scroll area on touchpads <50mm highPeter Hutterer1-1/+17
We simply don't have enough space on those touchpads to have an area carved out for horizontal scrolling. Given that horizontal scrolling is rarely needed anyway users of these touchpads will just have to cling to scroll bars or use two-finger scrolling. Exception are small clickpads because they already have an area blocked off for software buttons and those small clickpads generally come from a time when clickfinger wasn't much of a thing yet. https://bugs.freedesktop.org/show_bug.cgi?id=96910 Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Hans de Goede <hdegoede@redhat.com>
2016-07-14touchpad: reduce middle button size on Dell touchpads to 10mmPeter Hutterer3-3/+23
All Dell touchpas appear to have a visual marker on their touchpads. With a visible marker our middle button can (and should) be much smaller since we can rely on users to hit the button precisely. https://bugs.freedesktop.org/show_bug.cgi?id=96710 Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Tested-by: Andy Lutomirski <luto@kernel.org> Reviewed-by: Yong Bakos <ybakos@humanoriented.com> Reviewed-by: Hans de Goede <hdegoede@redhat.com>
2016-07-13touchpad: drop unused argument diagonal from tp_init_accelPeter Hutterer1-4/+2
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2016-07-13tablet: catch potential segfault if the filter fails to allocatePeter Hutterer1-0/+2
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2016-07-13Fix some indentation issuesPeter Hutterer1-5/+5
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2016-07-11Remove LIBINPUT_EVENT_TABLET_PAD_MODE eventPeter Hutterer2-15/+0
Unimplemented and it wasn't supposed to be in the series. https://lists.freedesktop.org/archives/wayland-devel/2016-June/029376.html Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Carlos Garnacho <carlosg@gnome.org>
2016-07-11Fix and improve mode group documentationPeter Hutterer1-18/+29
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2016-07-04Merge branch 'wip/tablet-pad-modes-v3'Peter Hutterer10-151/+952
2016-07-04touchpad: remove software middle button when emulation is enabledPeter Hutterer6-5/+111
Expose the middle button emulation on software buttons as proper config option. When enabled, remove the middle button software button area. https://bugs.freedesktop.org/show_bug.cgi?id=96663 Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Hans de Goede <hdegoede@redhat.com>
2016-07-04evdev: return the desired middle button emulation statePeter Hutterer1-1/+1
Middle button emulation may be delayed in turning on, but during that delay we already need to return the desired state. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2016-07-04touchpad: unify internal/external touchpad taggingPeter Hutterer3-20/+55
To unify this we need to move the tagging process forward so tp_init() can rely on it for config setup. This means moving it to the touchpad init code. Other than that no real functional changes, the rules stay the same: * serial/i2c/etc. are considered internal touchpads * Bluetooth is always external * USB is external for Logitech devices * USB is external for Wacom devices * USB is internal for Apple touchpads And if we can't figure it out, we assume it's external and log a message so we can put a quirk in place. https://bugs.freedesktop.org/show_bug.cgi?id=96735 Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2016-07-04gestures: make the gesture movement threshold depending on finger countPeter Hutterer1-3/+6
Increase the mm move threshold for 3 and 4 finger gestures to 2 and 3 mm, respectively. In multi-finger gestures it's common to have minor movement while all fingers are being put down or before the conscious movement starts. This can trigger invalid gesture detection (e.g. a pinch instead of a swipe). Increase the movement threshold to make sure we have sufficient input data. No changes to 2-finger movements. https://bugs.freedesktop.org/show_bug.cgi?id=96687 Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Hans de Goede <hdegoede@redhat.com>