summaryrefslogtreecommitdiff
path: root/src/filter.h
Commit message (Collapse)AuthorAgeFilesLines
* filter: add scroll movement type to the custom acceleration profileYinon Burgansky2023-02-241-0/+27
| | | | | | | | Adds a dedicated scroll movement type to the custom acceleration profile. Supported by physical mouse and touchpad. Other profiles remain the same by using the same unaccelerated filter for the scroll filter. Signed-off-by: Yinon Burgansky <51504-Yinon@users.noreply.gitlab.freedesktop.org>
* Introduce custom acceleration profileYinon Burgansky2023-01-171-0/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The custom acceleration profile allow the user to define custom acceleration functions for each movement type per device, giving full control over accelerations behavior at different speeds. This commit introduces 2 movement types which corresponds to the 2 profiles currently in use by libinput. regular filter is Motion type. constant filter is Fallback type. This allows possible expansion of new movement types for the different devices. The custom pointer acceleration profile gives the user full control over the acceleration behavior at different speeds. The user needs to provide a custom acceleration function f(x) where the x-axis is the device speed and the y-axis is the pointer speed. The user should take into account the native device dpi and screen dpi in order to achieve the desired behavior/feel of the acceleration. The custom acceleration function is defined using n points which are spaced uniformly along the x-axis, starting from 0 and continuing in constant steps. There by the points defining the custom function are: (0 * step, f[0]), (1 * step, f[1]), ..., ((n-1) * step, f[n-1]) where f is a list of n unitless values defining the acceleration factor for each velocity. When a velocity value does not lie exactly on those points, a linear interpolation of the two closest points will be calculated. When a velocity value is greater than the max point defined, a linear extrapolation of the two biggest points will be calculated. Signed-off-by: Yinon Burgansky <51504-Yinon@users.noreply.gitlab.freedesktop.org> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
* filter: add a flat trackpoint accelPeter Hutterer2022-09-081-0/+3
| | | | | | | | | | | Previously, trackpoints got assigned the normal flat profile which does not accommodate for the trackpoint magic multiplier *and* had a config range that was too small if you take the multiplire indo account anyway. Fix this by adding a trackpoint-specific flat accel that has a wider configuration range and take sthe magic multiplier into account. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
* treewide: fix typosTorstein Husebø2020-12-161-1/+1
| | | | Signed-off-by: Torstein Husebø <torstein@huseboe.net>
* [clang-tidy] fix inconsistent declarationsRosen Penev2020-08-271-1/+1
| | | | | | Found with readability-inconsistent-declaration-parameter-name Signed-off-by: Rosen Penev <rosenp@gmail.com>
* Allow the flat acceleration profile for touchpadsEvan Goode2020-05-271-0/+3
| | | | Signed-off-by: Evan Goode <mail@evangoo.de>
* Add quirk to control velocity averaging, disable it by defaultKim Lindberger2018-08-221-5/+6
| | | | | | | | | | | libinput applies averaging to the velocity of most pointer devices. Averaging the velocity makes the motion look smooth and may be of benefit to bad input devices. For good devices, however, it comes at the unfortunate price of decreased accuaracy. This change turns velocity averaging off by default (sets ntrackers to 2 instead of 16) and allows for it to be turned back on via a quirk, for bad devices which require it.
* filter: add a trackpoint multiplier factorPeter Hutterer2018-07-111-1/+1
| | | | | | | | | Measuring the trackpoint range has not shown to be sufficient or precise enough to be used as an ingredient for trackpoint acceleration. So let's just switch back to a generic multiplier that we can apply to the input deltas do undo any device-specific lack of scaling. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
* filter: make the trackpoint accel profile func the same prototype as the othersPeter Hutterer2018-07-111-1/+2
| | | | Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
* Revert "Expose a custom acceleration profile"Peter Hutterer2018-05-211-12/+0
| | | | | | | | | | | | | | | This looked good on paper but clearly no-one (including myself) ever tested this in a real-life situation or they would've noticed that the constant factor is missing, causing a segfault on the first two-finger scroll event, touchpad gesture or button scrolling. Adding the constant factor makes the API much worse and the benefit is unclear, so out of the window it goes. We can revisit this for libinput 1.12 but this isn't going to make the next release. This reverts commit d8bd650540e68e8b648e76180c5eee0f19a3b893. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
* Expose a custom acceleration profilePeter Hutterer2018-04-261-0/+12
| | | | | | | | | | | | | | | | | | | | | | This adds a third profile to the available profiles to map device-specific speed to an acceleration factor, fully defined by the caller. There has been a consistent call for different acceleration profiles in libinput, but very little specifics in what actually needs to be changed. "faster horses" and whatnot (some notable exceptions in e.g. bug 101139). Attempts to change the actual acceleration function will likely break things for others. This approach opens up the profile itself to a user-specific acceleration curve. A caller can set an acceleration curve by defining a number of points on that curve to map input speed to an output factor. That factor is applied to the input delta. libinput does relatively little besides mapping the deltas to the device-specific speed, querying the curve for that speed and applying that factor. The curve is device-specific, the input speed is in device units/ms. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
* touchpad: Enable timestamp smoothing support for bluetooth touchpadsHans de Goede2017-08-011-1/+3
| | | | | | | | Bluetooth wreaks havoc with the timestamp of the input events coming from the touchpad, enable timestamp smoothing support to counter this. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
* filter: add a custom trackpoint acceleratorPeter Hutterer2017-07-201-3/+2
| | | | | | | | Switch to a pure factor with a max scaled after a function. The offset is just 0 now (will be removed eventually). Both are determined with a function based on a linear/exponential regression of a sample set of data pairs. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
* filter: change the filter functions to take raw device coordinatesPeter Hutterer2016-12-211-2/+23
| | | | | | | | | | | | | | | | | | | | | | | | We used to normalize all deltas to equivalents of a 1000dpi mouse before passing it into the acceleration functions. This has a bunch of drawbacks, not least that we already have to un-normalize back into device units for a few devices already (trackpoints, tablet, low-dpi mice). Switch the filter code over to use device units, relying on the dpi set earlier during filter creation to convert to normalized. To make things easy, the output of the filter code is still normalized data, i.e. data ready to be handed to the libinput caller. No effective functional changes. For touchpads, we still send normalized coordinates (for now, anyway). For the various filter methods, we either drop the places where we unnormalized before or we normalize where needed. Two possible changes: for trackpoints and low-dpi mice we had a max dpi factor of 1.0 before - now we don't anymore. This was only the case if a low-dpi mouse had more than 1000dpi (never true) or a trackpoint had a const accel lower than 1.0 (yeah, whatever). Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Hans de Goede <hdegoede@redhat.com>
* tablet: hook up relative motion eventsPeter Hutterer2016-01-221-0/+3
| | | | | Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Acked-by: Jason Gerecke <jason.gerecke@wacom.com>
* Add an API to change pointer acceleration profilesPeter Hutterer2015-09-111-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | The quartett of new config functions is: libinput_device_config_accel_get_profiles libinput_device_config_accel_get_profile libinput_device_config_accel_set_profile libinput_device_config_accel_get_default_profile The profile defines how the pointer acceleration works, from a very high-level perspective. Two profiles are on offer, "adaptive", the standard one we have used so far and "flat" which is a simple multiplier of input deltas and provides 1:1 mapping of device movement vs pointer movement. The speed setting is on top of the profile, a speed of 0 (default) is the equivalent to "no pointer acceleration". This is popular among gamers and users of switchable-dpi mice. The flat profile unnormalizes the deltas, i.e. you get what the device does and any device below 800dpi will feel excruciatingly slow. The speed range [-1, 1] maps into 0-200% of the speed. At 200%, a delta of 1 is translated into a 2 pixel movement, anything higher makes it rather pointless. The flat profile is currently available for all pointer devices but touchpads. https://bugs.freedesktop.org/show_bug.cgi?id=89485 Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Hans de Goede <hdegoede@redhat.com>
* filter: add a "filter_constant" hook to the filter interfacePeter Hutterer2015-08-201-0/+22
| | | | | | | | | For when we need to apply some transformation to the data but it shouldn't be acceleration. Example use are touchpad coordinates, even when not accelerating, we still want to apply the magic slowdown. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Hans de Goede <hdegoede@redhat.com>
* filter: split trackpoint acceleration outPeter Hutterer2015-08-121-0/+8
| | | | | | | | | | | This is step one to fixing trackpoint acceleration, separating it from the other acceleration code. No functional changes yet, it still uses the low-dpi accel method. https://bugs.freedesktop.org/show_bug.cgi?id=91369 Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Jonas Ådahl <jadahl@gmail.com>
* filter: revamp to create device-specific filters, rather than accel functionsPeter Hutterer2015-08-111-2/+12
| | | | | | | | | | | | | | | | The previous approach to pointer acceleration was to initialize the same motion filter behavior but a different acceleration profile depending on the hardware (the profile converts a speed to a multiplier for input deltas). To be more flexible for hardware-specifics, change this into a set of specific pointer acceleration init functions. This patch has no effective functional changes, they're still all the same. The acceleration functions are kept for direct access by the ptraccel-debug tool. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Jonas Ådahl <jadahl@gmail.com>
* filter: add a custom low-dpi accelerationPeter Hutterer2015-07-021-0/+5
| | | | | | | | | | | | | | | | | | | Motion normalization does not work well for devices below the default 1000dpi rate. A 400dpi mouse's minimum movement generates a 2.5 normalized motion, causing it to skip pixels at low speeds even when unaccelerated. Likewise, we don't want 1000dpi mice to be normalized to a 400dpi mouse, it feels sluggish even at higher acceleration speeds. Instead, add a custom acceleration method for lower-dpi mice. At low-speeds, one device unit results in a one-pixel movement. Depending on the DPI factor, the acceleration kicks in earlier and goes to higher acceleration so faster movements with a low-dpi mouse feel approximately the same as the same movement on a higher-dpi mouse. https://bugzilla.redhat.com/show_bug.cgi?id=1231304 Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Hans de Goede <hdegoede@redhat.com>
* filter: pass the DPI to the acceleration filterPeter Hutterer2015-07-021-1/+2
| | | | | | | Currently unused, but store the ratio of DPI:default DPI for later use. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Hans de Goede <hdegoede@redhat.com>
* COPYING: Update boilerplate from MIT X11 to MIT Expat licensePeter Hutterer2015-06-161-16/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | To quote Bryce Harrington from [1]: "MIT has released software under several slightly different licenses, including the old 'X11 License' or 'MIT License'. Some code under this license was in fact included in X.org's Xserver in the past. However, X.org now prefers the MIT Expat License as the standard (which, confusingly, is also referred to as the 'MIT License'). See http://cgit.freedesktop.org/xorg/xserver/tree/COPYING When Wayland started, it was Kristian Høgsberg's intent to license it compatibly with X.org. "I wanted Wayland to be usable (license-wise) whereever X was usable." But, the text of the older X11 License was taken for Wayland, rather than X11's current standard. This patch corrects this by swapping in the intended text." libinput is a fork of weston and thus inherited the original license intent and the license boilerplate itself. See this thread on wayland-devel here for a discussion: http://lists.freedesktop.org/archives/wayland-devel/2015-May/022301.html [1] http://lists.freedesktop.org/archives/wayland-devel/2015-June/022552.html Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Hans de Goede <hdegoede@redhat.com> Acked-by: Benjamin Tissoires <benjamin.tissoires@gmail.com> Acked-by: Jonas Ådahl <jadahl@gmail.com>
* touchpad: restart the motion filter on touch beginPeter Hutterer2015-06-111-0/+5
| | | | | | | | | | | | | | | | | | | | | Our motion filter takes the last couple of vectors to calculate speed, provided the direction stays the same and it is within a certain timeout. It does not take into account lifting the finger, so the velocity on the first event is off. Real-world impact is mainly on scrolling. Before commit 289e4675 filter: enforce minimum velocity the first motion on a scroll was accelerated by a factor of 0 and swallowed. After 289e4675 the motion was calculated based on the timeout and a fraction of the expected effect. Now the first scroll motion is based on the real finger motion since setting the finger down and thus feels a bit more responsive. It also makes a couple of test cases using litest_assert_scroll() work again since the miniumum motion is now as expected. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Hans de Goede <hdegoede@redhat.com>
* Update Red Hat's copyrightPeter Hutterer2015-05-281-0/+1
| | | | | | Updated to 2015 where appropriate, added where missing. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
* evdev: use a different filter for low resolution touchpad on the Lenovo X230Benjamin Tissoires2015-04-271-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Those touchpads presents an actual lower resolution that what is advertised. We see some jumps from the cursor due to the big steps in X and Y when we are receiving data. For instance, we receive: E: 13.471932 0003 0000 16366 # EV_ABS / ABS_X 16366 E: 13.471932 0003 0001 9591 # EV_ABS / ABS_Y 9591 E: 13.471932 0000 0000 0000 # ------------ SYN_REPORT (0) ---------- E: 13.479924 0003 0000 16316 # EV_ABS / ABS_X 16316 E: 13.479924 0003 0001 9491 # EV_ABS / ABS_Y 9491 E: 13.479924 0000 0000 0000 # ------------ SYN_REPORT (0) ---------- E: 13.487939 0003 0000 16271 # EV_ABS / ABS_X 16271 E: 13.487939 0003 0001 9403 # EV_ABS / ABS_Y 9403 E: 13.487939 0000 0000 0000 # ------------ SYN_REPORT (0) ---------- -> jumps of ~50 in X in each report, and ~100 for Y. Apply a factor to minimize those jumps at low speed, and try keeping the same feeling as regular touchpads at high speed. It still feels slower but it is usable at least Signed-off-by: Benjamin Tissoires <benjamin.tissoires@gmail.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Tested-by: Vasily Khoruzhick <anarsoul@gmail.com> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
* filter: switch to normalized_coordsPeter Hutterer2015-03-191-5/+3
| | | | | Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Hans de Goede <hdegoede@redhat.com>
* Push the touchpad magic slowdown to the touchpad accel codePeter Hutterer2015-03-171-0/+5
| | | | | | | | | | | | | | | | This way the unaccelerated deltas returned by libinput are correct. To maintain the current behavior we slow down the input speed by the magic factor and likewise the accelerated output speed. This produces virtually the same accelerated deltas as the previous code. The magic factor is applied to the default denominator for guessing a resolution based on the touchpad diagonal. We can't really get around this without having a resolution from the touchpad; meanwhile this produces virtually the same coordinates before/after. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Hans de Goede <hdegoede@redhat.com>
* Move DEFAULT_MOUSE_DPI to evdev.h, provide a conversion macroPeter Hutterer2015-03-101-3/+0
| | | | | | | | | | Ideally we want to specify various thresholds in mm, but not all touchpads set the hardware resolutions. Rather than conditions to check for resolutions everywhere, use a macro to give us a normalized value that we use for motion as well. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Hans de Goede <hdegoede@redhat.com>
* cosmetic: more duplicate empty line removalPeter Hutterer2015-03-021-1/+0
| | | | | | This should be it now, finally... Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
* Change default DPI to 1000Peter Hutterer2014-12-021-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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-021-0/+3
| | | | | | | | | | | | | 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>
* filter: Fix typoDerek Foreman2014-10-311-1/+1
| | | | | | | accelator -> accelerator Signed-off-by: Derek Foreman <derekf@osg.samsung.com> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
* filter: add a configurable speed interfacePeter Hutterer2014-09-231-0/+7
| | | | | Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Hans de Goede <hdegoede@redhat.com>
* filter: add a filter-private.h header filePeter Hutterer2014-09-231-12/+0
| | | | | | | To keep the implementation of a filter separate from the users of a filter. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Hans de Goede <hdegoede@redhat.com>
* Replace pointer acceleration with a much simpler linear onePeter Hutterer2014-09-231-9/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We ran a userstudy, evaluating three different accel methods. Detailed results are available at: http://www.who-t.net/publications/hutterer2014_libinput_ptraccel_study.pdf We found that there was little difference between the method we had in libinput 0.6 and this three-line function. Users didn't really notice a difference, but measured data suggests that it has slight advantages in some use-cases. The method proposed here is the one labeled "linear" in the paper, its profile looks roughly like this: _____________ / ____/ / / where the x axis is the speed, y is the acceleration factor. The first plateau is at the acceleration factor 1 (i.e. unaccelerated movement), the second plateau is at the max acceleration factor. The threshold in the code defines where and how long the plateau is. Differences to the previous accel function: - both inclines are linear rather than curved - the second incline is less steep than the current method From a maintainer's point-of-view, this function is significantly easier to understand and manipulate than the previous one. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Hans de Goede <hdegoede@redhat.com>
* cosmetic: Remove prototype for nonexistent create_linear_acceleration_filter()Derek Foreman2014-09-191-3/+0
| | | | Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
* Include stdint.h from filter.hPeter Hutterer2014-07-161-0/+2
| | | | | | Don't rely on the users to include it Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
* touchpad: normalize the touchpad resolution to 400dpi, not 10 units/mmPeter Hutterer2014-07-091-1/+1
| | | | | | | | | In an attempt to bring method into the madness, normalize the touchpad deltas to those of a USB mouse with 400 dpi. This way the data we're dealing with in the acceleration code is of a known quantity. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Hans de Goede <hdegoede@redhat.com>
* filter: rename motion_filter_destroy to filter_destroyPeter Hutterer2014-07-091-2/+2
| | | | | | | | For better consistency with filter_dispatch(). And move the things around to keep the consumable API together. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Hans de Goede <hdegoede@redhat.com>
* Add basic mouse pointer accelerationJonas Ådahl2014-05-291-0/+14
| | | | | | | | | | | | | | This patch reimplements the simple smooth pointer acceleration profile from X.org xserver. The algorithm is identical to the classic profile with a non-zero pointer acceleration threshold. When support for changable parameters is in place, to get a pointer acceleration the same as the default classic profile of X.org a polynomial acceleration profile should be used for when the threshold parameter is zero. Signed-off-by: Jonas Ådahl <jadahl@gmail.com> Reviewed-by: Hans de Goede <hdegoede@redhat.com>
* filter: Add motion filter destruction helperJonas Ådahl2014-05-291-0/+3
| | | | | Signed-off-by: Jonas Ådahl <jadahl@gmail.com> Reviewed-by: Hans de Goede <hdegoede@redhat.com>
* Change internal timestamps to uint64_t to properly deal with wrappingHans de Goede2014-05-221-3/+3
| | | | | | | | | | | | | | | | | | | | | | | We store timestamps in ms since system boot (CLOCK_MONOTONIC). This will wrap after circa 50 days. I've considered making our code wrapping safe, but that won't work. We also use our internal timestamps to program timer-fds for timeouts. And we store ms in a single integer but the kernel uses 2 integers, one for seconds and one for usec/nanosec. So at 32 bits our ms containing integer will wrap in 50 days, while the kernels seconds storing integer lasts a lot longer. So when we wrap our ms timestamps, we will be programming the timer-fds with a seconds value in the past. So change all our internal timestamps to uint64_t to avoid the wrapping when programming the timer-fds. Note that we move from 64-bit timestamps to 32-bit timestamps when calling the foo_notify_bar functions from libinput-private.h. Having 64 bit timestamps has no use past this point, since the wayland input protocol uses 32 bit timestamps (and clients will have to deal with wrapping). Signed-off-by: Hans de Goede <hdegoede@redhat.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
* Port evdev code to be used as a shared libraryJonas Ådahl2013-11-121-22/+18
| | | | | | | | | | | | | | | This commit introduces build script configuration for building a shared library 'libinput.so' containing the evdev input device functionality from weston. evdev.c, evdev.h and evdev-touchpad.c are ported to not use the data structures and API in weston and libwayland-server in order to minimize dependencies. The API of filter.c and filter.h are renamed to not include the 'weston_' prefix. Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
* filter: Remove unused variableJonas Ådahl2013-11-121-1/+0
| | | | Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
* Add more missing config.h includesDaniel Stone2013-11-101-0/+2
| | | | | | | | config.h includes were missing in a few files, including input.c, the lack of which caused the X11 backend to segfault instantly due to not having an xkbcommon context. Signed-off-by: Daniel Stone <daniel@fooishbar.org>
* evdev: Improve touchpad support and add motion filtersJonas Ådahl2013-11-101-0/+65
Touchpad related code has been rewritten and moved to its own file accessed by evdev via the dispatch interface. The various functionality implemented are anti-jitter (don't jumping around), smoother motions, touch detection, pointer acceleration and some more. Pointer acceleration is implemented as one generic part, and one touch specific part (a profile). Some ideas and magic numbers comes from xserver and xf86-input-synaptics. Signed-off-by: Jonas Ådahl <jadahl@gmail.com>