summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2017-05-10util: fix container_of() macroPeter Hutterer1-1/+1
Fixes a bunch of warnings of the kind ../src/evdev.h:378:32: warning: variable 'f' is uninitialized when used here [-Wuninitialized] return container_of(dispatch, f, base); Just typecasting NULL means we can ignore sample but for the type. https://bugs.freedesktop.org/show_bug.cgi?id=100976 Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Armin Krezović <krezovic.armin@gmail.com> Tested-by: Armin Krezović <krezovic.armin@gmail.com> Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
2017-05-10util: drop GCC specifics for container_ofPeter Hutterer1-6/+0
clang supports __typeof__ which was the only real difference. Not sure any other compilers matter (that don't support __typeof__) Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Armin Krezović <krezovic.armin@gmail.com> Tested-by: Armin Krezović <krezovic.armin@gmail.com> Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
2017-05-08test: suppress Python3 valgrind errorsPeter Hutterer1-0/+6
Running through mesontest also runs parse-hwdb through valgrind and gives us a bunch of leaks that originate within Python somewhere - we don't care about those. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-05-08test: disable coredumps during test suite runsPeter Hutterer1-0/+5
Running valgrind through mesontest produces coredumps for a lot of tests (unclear why, the core dump merely shows a call to abort). But even without mesontest, creating a core dump for each failed test is a bad idea - if one fails, most likely many others fail and the coredumps quickly fill up the file system. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-05-05lid: remove the keyboard listener on remove and re-init the listenerPeter Hutterer2-2/+49
If the event listener is added, then removed again on a lid switch on/off event, the list is set to null. This can trigger two crashes: * when the keyboard is removed first, the call to libinput_device_remove_event_listener() dereferences the null pointer * when the switch is removed first, the call to device_destroy will find a remaining event listener and assert https://bugzilla.redhat.com/show_bug.cgi?id=1440927 Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-05-05touchpad: remove the lid switch listener on device_removedPeter Hutterer2-0/+32
Sequence triggered by the xorg driver, but basically: if the touchpad is destroyed before the lid switch, the event listener wasn't removed and an assertion was triggered. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-05-04util: add asserts with useful error messages to catch uninitialized listsPeter Hutterer1-0/+9
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-05-04doc: add build instructions for mesonPeter Hutterer1-4/+51
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-05-04Add meson.build filePeter Hutterer3-0/+609
v2: - meson 0.40 requirement - add_project_arguments() instead of add_global_arguments() - use cc.get_define('static_assert') - use config.set10 and config.set_quoted instead of manual handling - more use of join_paths - use files() for model quirks hwdb check - update options to all state 'true' as default instead of variations of 'true', 'enabled' and 'yes' v3: - drop -Wall -Wextra and -g, let meson set that with warning_level/debug build - add meson files to EXTRA_DIST Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-05-04test: switch from #ifdef to #if HAVE_LIBUNWINDPeter Hutterer1-1/+1
We use #if everywhere else and it allows building with '-Wundef -Werror=undef' to avoid accidental misuse. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-05-04configure.ac: drop checks for a few flagsPeter Hutterer1-9/+0
These were added in 2013 for old enterprise distributions (centos 5.5, see fdo bz 63360), it's now 4 years later and these checks seems a bit superfluous. If those bits are missing, compilation will fail anyway. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-05-04test: allow running the symbols-leak-test.in script directlyPeter Hutterer1-2/+13
With autotools, we replace the @top_srcdir@ during configure and then run teh resulting scripts. With meson, it's easier to just pass top-srcdir it in as argument. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Eric Engestrom <eric@engestrom.ch>
2017-05-04doc: drop the explicit input from the doxygen.inPeter Hutterer1-2/+1
We pass in the input via the commandline, so having the files here is misleading. Replace it with an @INPUT@ - in autotools that one is ignored but it'll help meson. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-05-04Rename man pages to .1 suffix for meson's benefitPeter Hutterer3-2/+2
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-05-04doc: update build instructions for lack of autodetectionPeter Hutterer1-9/+5
Since we dropped autodetection of features in configure, these instructions were incorrect. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-05-04test: fix compiler warningPeter Hutterer1-1/+2
test-tablet.c: In function ‘proximity_in_out’: test-tablet.c:797:20: warning: increment of a boolean expression [-Wbool-operation] have_tool_update++; And tighten the test so we fail for multiple prox in events Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-05-04test: undef ck_assert_double before redefining itPeter Hutterer1-0/+7
check 0.11 has those macros, but they don't work the same way as our homemade ones. So for now just #undef them Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-05-04Merge branch 'wip/touchpad-tap-timestamps'Peter Hutterer10-72/+390
2017-05-03lid: fix some indentationPeter Hutterer1-5/+5
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-05-03touchpad: make use of use tp_for_each_touchMarcos Paulo de Souza2-12/+5
Instead of reimplementing a for loop every time. Signed-off-by: Marcos Paulo de Souza <marcos.souza.org@gmail.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-05-02doc: fix doxygen group for libinput_event_tablet_pad_get_timePeter Hutterer1-1/+1
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-05-02doc: document the event timestampsPeter Hutterer4-1/+81
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-05-02udev: Add specific pressure range for the ASUS ZenBook UX21EPaul Kocialkowski1-0/+3
This adds specific pressure range values for the Elantech touchpad found in the ASUS ZenBook UX21E. https://bugs.freedesktop.org/show_bug.cgi?id=99975 Signed-off-by: Paul Kocialkowski <contact@paulk.fr> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-05-02udev: Select more generic pressure range values for Elantech touchpadsPaul Kocialkowski1-1/+1
The current pressure values for Elantech touchpads are too high for various devices and make the touchpad almost unusable on them. Decreasing the pressure range values makes those devices usable again. Signed-off-by: Paul Kocialkowski <contact@paulk.fr> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-05-02udev: Remove unused Elantech touchpad model bindingPaul Kocialkowski3-3/+0
The Elantech touchpad model binding in udev is currently unused, since pressure values were moved to a udev binding of their own. This gets rid of the deprecated model binding. Signed-off-by: Paul Kocialkowski <contact@paulk.fr> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-04-28Put a check in to make sure our events have correct timestampsPeter Hutterer2-37/+51
This is for debugging purposes only, we cannot guarantee that event timestamps always go up - at least not across devices. Example: tapping on a touchpad may delay an event until a timeout expires, but that event is then sent with the original touch timestamps (i.e. in the past). If any other device produces events during that timeout period, our timestamps are out-of-order. This isn't really a bug because we are forced to do that, but for bug-fixing it can be useful to detect. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-04-28touchpad: add touch state debugging helperPeter Hutterer1-0/+25
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-04-28touchpad: for 2/3-finger tap, use the last finger down as press timePeter Hutterer2-1/+65
This makes the tapping times shorter and hopefully more obvious. It also fixes a bug where repeated tripletap (by tapping with one finger while leaving the other two down) could cause incorrect timestamps. https://bugs.freedesktop.org/show_bug.cgi?id=100796 Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-04-28touchpad: send multitap button events with the correct timestampsPeter Hutterer3-17/+105
For multitap, we're one tap behind with the button clicks, i.e. we send the first full click button on the second tap, etc. Remember the timestamps of the touches so we can send the events with the right timestamps. This makes tapping more accurate because the time between taps and various timeouts matter less for double-click detection. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-04-28test: enable drag lock for multitap testsPeter Hutterer1-0/+5
Without this enabled, we stay in the single/double tap part of the state machine and a triple tap is just a double tap followed by a single tap. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-04-28touchpad: fix the button timestamps for double/tripletapPeter Hutterer2-18/+60
Both events had the same timestamp but we have the timestamp from the original event - use it. https://bugs.freedesktop.org/show_bug.cgi?id=100796 Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-04-28doc: add a faq for synclient/syndaemonPeter Hutterer1-0/+23
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-04-26Merge branch 'wip/touchpad-custom-pressure-values'Peter Hutterer11-22/+266
2017-04-26touchpad: drop the unused touchpad_model enumPeter Hutterer1-9/+0
A leftover from synaptics where we do this detection in the driver. libinput pushes this to the hwdb and sets the model flags accordingly. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-04-26doc: add documentation for touchpad pressure detectionPeter Hutterer4-0/+145
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-04-26touchpad: move the pressure range to a hwdb entryPeter Hutterer6-13/+121
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-04-26Merge branch 'wip/touchpad-mt-tool-palm'Peter Hutterer3-32/+203
2017-04-26configure.ac: quote the xyes for the libunwind checkPeter Hutterer1-1/+1
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-04-26configure.ac: move some checks out of the libwacom sectionPeter Hutterer1-6/+7
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-04-25Rename README to README.md, include properly from doxygenPeter Hutterer4-8/+5
As of doxygen 1.8.3 (Dec 2012) doxygen can include a README.md directly as mainpage. This avoids the ugly doxygen bits we have in the current README. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-04-25Add doc to discourage use of libinput_device_get_output_name()Peter Hutterer1-0/+8
This is a leftover from when libinput was part of weston and we could interpret properties correctly. Realistically, the only way this could work with libinput as external library is if we define precisely what the definition of an output is. Practically, it's a lot easier to just throw up our hands and leave it all to the caller. https://bugs.freedesktop.org/show_bug.cgi?id=100707 Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2017-04-24evdev: improve default scroll button detectionPeter Hutterer2-0/+13
Try to guess the default scroll buttons a bit better. Right now we default to scroll button 0 (disabled) whenever a device doesn't have a middle button but we might as well cast a wider net here as setting a scroll button only has a direct effect when button scrolling is enabled. Use the first extra button we find or fall back onto the right button if we don't have any extra buttons. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-04-24doc: link the seats doc from the seat udev propertiesPeter Hutterer1-2/+2
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-04-21touchpad: add MT_TOOL-based palm detectionPeter Hutterer3-0/+128
If the touchpad driver tells us something is a palm, go with that. https://bugs.freedesktop.org/show_bug.cgi?id=100243 Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-04-21touchpad: add helper function for stopping current actionsPeter Hutterer1-6/+10
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-04-21touchpad: move edge palm init to separate helperPeter Hutterer1-12/+18
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-04-21touchpad: always enable trackpoint palm detectionPeter Hutterer1-0/+2
Trackpoints are situated so that a user is pretty much guaranteed to trigger some palm interaction, even if on a small touchpad. Always enable trackpoint monitoring on touchpads where required. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-04-21touchpad: make palm detection logging a bit easierPeter Hutterer1-3/+21
Nested trinary conditions are fun, but... Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-04-21touchpad: move edge palm detection into a helper tooPeter Hutterer1-14/+27
Just code cleanup, no changes. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-04-20tools: update man page for debug-events --show-keycodes flagPeter Hutterer1-5/+7
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>