summaryrefslogtreecommitdiff
path: root/src/filter-private.h
AgeCommit message (Collapse)AuthorFilesLines
2015-09-11Add an API to change pointer acceleration profilesPeter Hutterer1-0/+1
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>
2015-08-20filter: add a "filter_constant" hook to the filter interfacePeter Hutterer1-0/+4
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>
2015-08-11filter: rename speed to speed_adjustment where it's in the [-1,1] rangePeter Hutterer1-2/+2
To avoid confusion with the other speed in units/time Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2015-06-16COPYING: Update boilerplate from MIT X11 to MIT Expat licensePeter Hutterer1-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>
2015-06-11touchpad: restart the motion filter on touch beginPeter Hutterer1-0/+3
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>
2015-03-19filter: switch to normalized_coordsPeter Hutterer1-3/+4
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Hans de Goede <hdegoede@redhat.com>
2015-03-02cosmetic: more duplicate empty line removalPeter Hutterer1-1/+0
This should be it now, finally... Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2014-09-23filter: add a configurable speed interfacePeter Hutterer1-0/+3
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Hans de Goede <hdegoede@redhat.com>
2014-09-23filter: add a filter-private.h header filePeter Hutterer1-0/+42
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>