summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* configure.ac: libinput 0.70.7.0Peter Hutterer2014-12-051-2/+2
| | | | Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
* udev: only apply default calibration on absolute devicesPeter Hutterer2014-12-051-1/+2
| | | | | | | | | Fixes a crash if the LIBINPUT_CALIBRATION_MATRIX is set for a relative device. https://bugs.freedesktop.org/show_bug.cgi?id=86993 Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Jonas Ådahl <jadahl@gmail.com>
* Split libinput-util into a noinst helper libraryPeter Hutterer2014-12-053-7/+16
| | | | | | | | | | | | | | | | Fixes distcheck (automake 1.14.1) make[2]: Entering directory '....../libinput-0.7.0/_build/test' Makefile:926: ../src/.deps/libinput-util.Plo: No such file or directory make[2]: *** No rule to make target '../src/.deps/libinput-util.Plo'. Stop. make[2]: Leaving directory '....../libinput/libinput-0.7.0/_build/test' Makefile:412: recipe for target 'distclean-recursive' failed That was the only place we used subdir objects, so we can drop it from configure now. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Jonas Ådahl <jadahl@gmail.com>
* test: Don't send two motion events when button scrollingJonas Ådahl2014-12-051-6/+0
| | | | | | | | | Button scrolling motion events don't pass through the acceleration filter so no need to assume the initial event will be absorbed. Signed-off-by: Jonas Ådahl <jadahl@gmail.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
* Introduce unaccelerated motion event vectorsJonas Ådahl2014-12-059-24/+188
| | | | | | | | | | | | | | | For certain applications (such as FPS games) it is necessary to use unaccelerated motion events (the motion vector that is passed to the acceleration filter) to get a more natural feeling. Supply this information by passing both accelerated and unaccelerated motion vectors to the existing motion event. Note that the unaccelerated motion event is not equivalent to 'raw' events as read from devices. Signed-off-by: Jonas Ådahl <jadahl@gmail.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
* Always check for INVALID configs firstPeter Hutterer2014-12-041-9/+9
| | | | | | | Always check for invalid input first, then check if the input is supported by the actual device. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
* touchpad: drop unused device arg from tp_clear_statePeter Hutterer2014-12-041-3/+3
| | | | Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
* Add missing @ingroup tagPeter Hutterer2014-12-041-0/+2
| | | | Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
* Document relative motion normalizationPeter Hutterer2014-12-031-0/+61
| | | | Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
* Add libinput_device_get_context/libinput_seat_get_contextPeter Hutterer2014-12-033-0/+46
| | | | | | | Allow retrieval of the libinput context from the seat and the device. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Hans de Goede <hdegoede@redhat.com>
* Add a function to retrieve the udev_device handle from a libinput devicePeter Hutterer2014-12-035-0/+46
| | | | | | | | | | | | | | The libinput device abstracts a number of things but sometimes the underlying device is important. The udev device provides the necessary handle to access that underlying device and various sysfs properties that may be necessary. A function returning the device node would've done the same thing but is more prone to race conditions than the udev_device. https://bugs.freedesktop.org/show_bug.cgi?id=85573 Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Hans de Goede <hdegoede@redhat.com>
* Change default DPI to 1000Peter Hutterer2014-12-022-1/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | 400 used to be the default DPI for many mice but it it's not anymore. A survey of mice shows that 400 is still common as one of the pre-configured settings in switchable multi-resolution gaming mice, but devices with a single resolution mostly favor 1000 dpi. Let's make that switch now so that any future changes to the pointer acceleration code assumes that resolution as a default. For the touchpad, this has a bad side-effect, caused by our expectation of mouse vs touchpad behaviours: our acceleration code ignores device type and provides the same acceleration for the same physical movement. Unfortunately, we expect touchpads to be significantly slower than mice. The previous 400 DPI worked because it caused an acceptable slowdown on input. e.g. on the T440 with a res of 42 units/mm, the scale coefficient was 0.37. For 1000 DPI as default, this now results in 0.94, i.e. speeding up the touchpad by a factor of 2.5. That is way too fast. Adding touchpad-specific filter code is a bigger project, so let's just add a fixme for now and scale the coefficient back to what it was before the DPI default change. Effect: touchpad behaves as before. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Hans de Goede <hdegoede@redhat.com>
* Move DEFAULT_MOUSE_DPI to filter.hPeter Hutterer2014-12-023-10/+8
| | | | | | | | | | | | | The filter code is what relies on some default dpi configuration to apply pointer acceleration and expects the input coordinates to be pre-scaled to that resolution. Let's move the define here so we can use it from the touchpad code too. No functional changes. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Hans de Goede <hdegoede@redhat.com>
* filter: fix a comment, 400 isn't hard-coded anymorePeter Hutterer2014-12-021-1/+1
| | | | | Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Hans de Goede <hdegoede@redhat.com>
* evdev: Query mouse DPI from udevDerek Foreman2014-12-024-1/+124
| | | | | | | | | | Instead of using a hard coded mouse DPI value, we query it from udev. If it's not present or the property is obviously broken we fall back to default. Signed-off-by: Derek Foreman <derekf@osg.samsung.com> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Hans de Goede <hdegoede@redhat.com>
* test: move device ID test to test/device.cPeter Hutterer2014-12-012-20/+20
| | | | | | | More appropriate here, they were in misc because this file didn't exist yet when they were added. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
* evdev: Fix uninitialized variable warningDerek Foreman2014-11-261-1/+1
| | | | | | | | | The early exit path in evdev_device_compare_syspath() expects udev_device_new to be initialized to NULL, but it wasn't. Signed-off-by: Derek Foreman <derekf@osg.samsung.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
* Ignore devices that have joystick buttonsKrzysztof A. Sobiecki2014-11-261-0/+9
| | | | | | | | This patch allows libinput to ignore devices that have joystick buttons. Signed-off-by: Krzysztof Sobiecki <sobkas@gmail.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
* touchpad: Add edge-scrolling supportHans de Goede2014-11-255-11/+767
| | | | | | | | | | | | | | Add edge-scrolling support for non multi-touch touchpads as well as for users who prefer edge-scrolling (as long as they don't have a clickpad). Note the percentage to use of the width / height as scroll-edge differs from one manufacturer to the next, the various per model percentages were taken from xf86-input-synaptics. BugLink: https://bugs.freedesktop.org/show_bug.cgi?id=85635 Signed-off-by: Hans de Goede <hdegoede@redhat.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
* touchpad: Add code to get the touchpad model / manufacturerHans de Goede2014-11-252-0/+46
| | | | | | | | | | | | This is useful to know in some cases, it is e.g. necessary to figure out which percentage of a touchpads range to use as edge for edge-scrolling. Note this is a slightly cleaned up copy of the same code in xf86-input-synaptics. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
* touchpad: Move 2 finger scrolling functions to above tp_process_state()Hans de Goede2014-11-251-59/+59
| | | | | | | | | This is purely a code move, this is a preparation patch for adding edge scrolling support. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
* test: add seat changing testsPeter Hutterer2014-11-252-2/+147
| | | | | Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Hans de Goede <hdegoede@redhat.com>
* Add libinput_device_set_seat_logical_name() to change seats at runtimePeter Hutterer2014-11-255-0/+80
| | | | | | | | | | | | | | | | | | | The seat of a device is currently immutable, but a device may (in a multi-pointer case) move between different logical seats. Moving it between seats is akin to removing it and re-plugging it, so let's do exactly that. The physical seat name stays immutable. Pro: - device handling after changing a seat remains identical as handling any other device. Con: - tracking a device across seat changes is difficult - this is not an atomic operation, if re-adding the device fails it stays removed from the original seat and is now dead Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Hans de Goede <hdegoede@redhat.com>
* path: optionally pass the seat name into path_device_enable()Peter Hutterer2014-11-251-8/+22
| | | | | | | Prep work for changing seat names on devices. No functional changes. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Hans de Goede <hdegoede@redhat.com>
* udev: optionally pass the seat name into device_added()Peter Hutterer2014-11-251-5/+8
| | | | | | | Prep work for changing seat names on devices. No functional changes. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Hans de Goede <hdegoede@redhat.com>
* evdev: remove a race condition opening the wrong devicePeter Hutterer2014-11-251-23/+26
| | | | | | | | | | | | | | | | | | | Potential race condition: - udev notifies us that a udev_device became available - we go for a coffee and chat to the neighbours on the way - the device is unplugged - a new device is plugged in, gets the same devnode - we finish our coffee and come back - open(udev_device_get_devnode()) - new device is now opened as the old device To avoid the above race, we compare the syspath of the device at the open fd with the syspath of the device we originally wanted. If they differ, we fail. evdev_compare_syspath was simply moved up. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Hans de Goede <hdegoede@redhat.com>
* evdev: use a udev_device instead of separate sysname/syspath/devnodePeter Hutterer2014-11-254-76/+45
| | | | | | | | | | Using a udev_device instead of the various bits separately safes us re-initializing udev contexts whenever we need to compare the device. And having the actual udev device makes it a bit easier to ensure that we're not re-initializing a different device as a current one. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Hans de Goede <hdegoede@redhat.com>
* path: store the udev device instead of just the devnodePeter Hutterer2014-11-253-66/+53
| | | | | | | | | | | Long-term plan to use more of udev_device here is to better protect us against re-opening a different device that happens to have the same devnode. This now also prints an error message for invalid devices, the log tests are adjusted. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Hans de Goede <hdegoede@redhat.com>
* path: split out creating a device into a helper functionPeter Hutterer2014-11-251-25/+32
| | | | | | | No functional changes Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Hans de Goede <hdegoede@redhat.com>
* path: keep the udev context aroundPeter Hutterer2014-11-252-13/+19
| | | | | | | | | We need it for each device anyway, keep the ref around. Makes error handling a bit easier, we don't need to handle failing udev_new() and reduce the danger of mis-refcounting it. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Hans de Goede <hdegoede@redhat.com>
* Rename scroll_mode to scroll_methodPeter Hutterer2014-11-2410-152/+152
| | | | | Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Hans de Goede <hdegoede@redhat.com>
* evdev: fix leaking file descriptorPeter Hutterer2014-11-211-3/+4
| | | | | | If zalloc fails, we need to close the fd. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
* Drop unused libinput_device->terminated fieldPeter Hutterer2014-11-201-1/+0
| | | | | | Unused since commit 56f7dde "Port udev-seat to be used in libinput" Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
* touchpad: print the device name on errorPeter Hutterer2014-11-201-2/+2
| | | | | | A little bit easier to recognize. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
* doc: add a few missing @ref tagsPeter Hutterer2014-11-201-48/+49
| | | | Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
* test: add natural scrolling tests for pointersPeter Hutterer2014-11-201-0/+56
| | | | | Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Hans de Goede <hdegoede@redhat.com>
* evdev: enable natural scrolling for all pointer devicesPeter Hutterer2014-11-202-19/+34
| | | | | Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Hans de Goede <hdegoede@redhat.com>
* evdev: move natural scrolling configuration into evdevPeter Hutterer2014-11-204-56/+58
| | | | | | | | We're about to add natural scroll support to other devices as well, let's share the code. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Hans de Goede <hdegoede@redhat.com>
* evdev: move calibration/sendevents config init into helpersPeter Hutterer2014-11-201-14/+27
| | | | | | | no functional changes Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Hans de Goede <hdegoede@redhat.com>
* tools: print the device name on DEVICE_ADDEDPeter Hutterer2014-11-202-2/+6
| | | | | Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Hans de Goede <hdegoede@redhat.com>
* tools: print config options for each device on DEVICE_ADDEDPeter Hutterer2014-11-201-0/+22
| | | | | Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Hans de Goede <hdegoede@redhat.com>
* Allow for a 0 button on button scrollingPeter Hutterer2014-11-202-1/+3
| | | | | | | | This effectively disables the button scrolling, but since 0 is the default button for most devices, we should allow setting the default button. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Hans de Goede <hdegoede@redhat.com>
* touchpad: Hookup scroll-mode configurationHans de Goede2014-11-202-3/+59
| | | | | | | | | Default to 2fg scrolling for now, once we have edge-scrolling we can default to edge-scrolling on touchpads which cannot detect more than 1 touch. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
* evdev: fix indentation on an if conditionPeter Hutterer2014-11-181-1/+1
| | | | Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
* evdev: add missing breakPeter Hutterer2014-11-181-1/+1
| | | | | | No effect, was the last case statement in the switch. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
* test: Add button scroll test to pointer testsHans de Goede2014-11-111-0/+40
| | | | | | | | | Non trackpoint button scrolling is mainly intended for use with trackballs, but we can test it just as well with any relative pointer device. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
* test: Add litest_button_scroll helper functionHans de Goede2014-11-113-33/+45
| | | | | | | | | Turn test_trackpoint_scroll into a generic helper function for testing "button scrolling". Signed-off-by: Hans de Goede <hdegoede@redhat.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
* test: Add trackpoint middle button scrolling disable testHans de Goede2014-11-111-0/+40
| | | | | | Signed-off-by: Hans de Goede <hdegoede@redhat.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
* test: s/test_2fg_scroll/test_trackpoint_scroll/Hans de Goede2014-11-111-7/+7
| | | | | | | | | Fix copy and paste error, causing the function to test trackpoint scrolling to be named test_2fg_scroll. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
* touchpad: s/config/config_natural/Hans de Goede2014-11-112-6/+6
| | | | | | | | To avoid confusion with scroll mode configuration. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>