summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* wacom 1.2.0HEADxf86-input-wacom-1.2.0masterPeter Hutterer2023-04-061-1/+1
| | | | Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
* CI: update some actions to v3Peter Hutterer2022-12-073-14/+14
| | | | | | | Node 12 is deprecated so let's switch to the newer version https://github.blog/changelog/2022-09-22-github-actions-all-actions-will-begin-running-on-node16-instead-of-node12/ Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
* Implement smooth panscrollingGreenscreener2022-11-248-37/+117
|
* Replace valuator array with valuator mask in convertAxesGreenscreener2022-11-244-75/+213
| | | | ValuatorMask has been around since xserver 1.10, released in 2011.
* Fixing discrepancy in naxesGreenscreener2022-11-231-2/+2
| | | | See https://github.com/linuxwacom/xf86-input-wacom/pull/222#discussion_r897908702
* Assign Wacom specific keys only to Wacom devicesPing Cheng2022-11-161-18/+25
| | | | | | | Most extra features are only for Wacom 0x56a devices. Make them specific so we don't abuse other devices ;). Signed-off-by: Ping Cheng <ping.cheng@wacom.com>
* Move wcmDeviceTypeKeys to wcmConfig.cPing Cheng2022-11-163-218/+214
| | | | | | | | | There is only one file that needs wcmDeviceTypeKeys. Move it and make it into a static routine to simply the logic. Also, there is no value to return from this routine. It sets the types and keys to the common structure. Signed-off-by: Ping Cheng <ping.cheng@wacom.com>
* gwacom: add support for special runtime optionsPeter Hutterer2022-09-132-0/+25
| | | | | | | | | | | | | This is a hack to make it possible to test options that cannot be set through the xorg.conf, e.g button actions that are set through the X-specific properties interface. Expose a new function for "runtime options", though the actual option implementation needs to be handled in the gwacom wrapper code - i.e. only options explicitly supported can work. The currently supported option is "PanButton" which maps the given button to the PanScroll action.
* x11: de-duplicate the valuator number assignmentPeter Hutterer2022-09-131-30/+28
| | | | | | Let's add a helper function for this so we can't mess this up. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
* Remove useless Wacom action name settingPeter Hutterer2022-09-011-6/+0
| | | | | | | | Copy/paste error from when this as lifted from the properties code to the core driver code, in the commits leading up to 5326fd126042684338dfb662f48ba2e27be7fa5a. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
* Bring two finger right-click function backPing Cheng2022-08-311-1/+1
| | | | | | | | | | | | | | | Patch 65b7c37 fixed spurious right-clicks by setting wcmGestureMode back to GESTURE_CANCEL_MODE immediately when there is less than two fingers on the tablet, if the wcmGestureMode was in SCROLL_MODE or ZOOM_MODE. However, it narrowed wcmFingerTapToClick() rotine to LAG_MODE, which removed the opportunity for the routine to executed. Revert that. Fixes: https://github.com/linuxwacom/xf86-input-wacom/commit/65b7c37f0fac5cdd03ff7f977124148d0bdf4be8 (Prevent spurious right-clicks at the end of very short scroll and zoom gestures) Signed-off-by: Ping Cheng <ping.cheng@wacom.com>
* Don't report error when waiting for serial numberPing Cheng2022-07-251-5/+12
| | | | | | | | | For some devices, such as AES pens, serial number is 0 when tool comes into proximity. That means serial number was not ready. It is a known state. All we needed is to wait for the non-zero serial number. Don't report it through W_ERROR. Signed-off-by: Ping Cheng <ping.cheng@wacom.com>
* Remove a comment referring to the wrong functionPeter Hutterer2022-07-251-4/+0
| | | | | | | The function moved away in e4ea35d56aec59a5de0ef3d9282fdd796d89e6ad, let's drop this comment. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
* wacom 1.1.0xf86-input-wacom-1.1.0Peter Hutterer2022-07-142-2/+2
| | | | Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
* meson.build: fixate the GIR namespace version to 1.0Peter Hutterer2022-07-141-1/+1
| | | | | | | | | This is more like a soname version than a project version - keeping it in step with the driver version means we also have to update each callsite. But it looks like we'll be stable for this for a while, so let's just fixate it. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
* gitignore: add __pycache__Peter Hutterer2022-06-201-0/+1
| | | | | | Might as well not accidentally commit this one Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
* test: add a test for the artpen/airbrush wheel updatesPeter Hutterer2022-06-132-0/+85
| | | | | | | | | | | | | | | | | | | | | | This was slightly too complicated to add to the existing test_axis_updates test, so that test is duplicated here, only testing what we see as "wheel" axis in the driver. The test is run for all three pens Because the X driver unconditionally sets ds->abswheel from the kernel events, we must take care only to send the kernel axis that matters for our current tool - otherwise we overwrite ds->abswheel with whichever one of ABS_Z or ABS_WHEEL is sent last in the evdev frame. In other words, we cannot test that artpen ignores ABS_WHEEL and airbrush ignores ABS_Z because ... they don't. For the generic pen that doesn't matter since we're supposed to ignore both axes anyway. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Ping Cheng <ping.cheng@wacom.com> Tested-by: Ping Cheng <ping.cheng@wacom.com>
* meson: default to pytest-3 first, then pytestPeter Hutterer2022-06-131-1/+1
| | | | | | | | | | | At least Ubuntu 20.04 has pytest point at the Python 2.x compatible version, resulting in syntax errors when trying to parse our Python 3 code files. So let's check pytest-3 first since that is the compatible version and fall back to normal pytest only where it's missing. Fixes #272 Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
* Added vim modelines to python files.Greenscreener2022-06-133-0/+9
|
* test: raise an InputError with better info if modules are missingPeter Hutterer2022-06-131-4/+12
| | | | | | | | The tests need to run as root (for uinput/evdev) so pip-installing a package as user gets past the build check but then fails at runtime. Let's make this bit easier to debug. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
* meson.build: default to verbose pytest loggingPeter Hutterer2022-06-131-0/+1
| | | | | | Might as well collect as much data as we can get Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
* test: Ensure standard pen does not report the "wheel" axisPeter Hutterer2022-06-012-5/+29
| | | | | | | | | | | | | | | | The event data has a mask field that specifies which fields are actually present (zero may be a valid value for an axis after all). Let's check that mask for each event and ensure that if the pen supports the axis, the axis is also present in the event. We still send kernel events for all axes to ensure the unsupported ones are correctly ignored by the driver. This allows us to parametrize the test with different stylus types and re-use the rest. Here we add a standard Cintiq pen and make sure the wheel axis is never set. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
* Don't report "wheel" valuator unless it exists on toolAaron Armstrong Skomra2022-06-011-10/+15
| | | | | | | | | Fixes #199 Prior to this commit we operated as if all non Art Pens needed this valuator normalized. Signed-off-by: Aaron Skomra <aaron.skomra@wacom.com>
* test: ignore test devices, or real devices during test suite runsPeter Hutterer2022-05-263-0/+28
| | | | | | | | | | | | Set an option on all our created uinput devices, and an environment variable when we're running the test suite. If both of these are set we process the device, otherwise ignore the device during PreInit. This stops the driver picking up events from test suite runs (potentially clicking around on the desktop) and it stops the test suite from false positives by locally connected devices. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
* test: fix a typoPeter Hutterer2022-05-261-1/+1
| | | | Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
* Fix xsetwacom returning 0 even when there's an error (#266)Joshua2022-05-231-78/+124
| | | | | | | | | | | | | | | xsetwacom was only able to return a failure on a few scenarios but would return a success even when the command would encounter failures. List, set, get, and some other functions within those all had the potential to fail and would print an error message when said failures occurred but would improperly return a success. This commit adds the ability to properly report a success(0) or a failure(-1) to the relevant functions including all get and set methods that can be called by get_func and set_func. Link: https://github.com/linuxwacom/xf86-input-wacom/issues/126 Signed-off-by: Joshua Dickens <joshua.dickens@wacom.com>
* test: add a test for the artpen rotationPeter Hutterer2022-05-102-3/+14
| | | | | | | | | | | | | | | The artpen has a physical rotation property, sent by the kernel driver as ABS_Z (historical reasons). In the driver this is mapped to the ds->abswheel state because this axis is shared with the airbrush wheel - both are sent through the same XI valuator (historical reasons, as usual). We can rather easily test this by ensuring we have an artpen device id and then send something through ABS_Z, that should update the wheel axis. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Aaron Skomra <aaron.skomra@wacom.com>
* test: ensure a device prox out after our eventsPeter Hutterer2022-05-101-0/+8
| | | | | | | | | This avoids a potential stuck button by leaving the tablet in proximity. Shouldn't happen since removing the device should release all buttons but... Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Aaron Skomra <aaron.skomra@wacom.com>
* test: swap the axis checks for an iterator-based approachPeter Hutterer2022-05-101-4/+6
| | | | | | | | | This ensures we get a StopIteration exception if we don't have the events we expect - previously we'd get a false positive on this test if we had no motion events after the first one. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Aaron Skomra <aaron.skomra@wacom.com>
* test: increase the count of events for axis update testsPeter Hutterer2022-05-101-1/+1
| | | | | | | | Make it 30% of the axis in 2% step increments, this gets past the issue of tilt not updating significantly and getting filtered. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Aaron Skomra <aaron.skomra@wacom.com>
* test: fix the ID assignment when parsing a device filePeter Hutterer2022-05-101-1/+6
| | | | | | | | | | Because InputId didn't have the same field order as the recording (to allow for default bustype, vid and version), we ended up with an erroneous vendor ID, causing some code paths in the driver to go the non-wacom path. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Aaron Skomra <aaron.skomra@wacom.com>
* test: add a helper script to set up the environmentPeter Hutterer2022-05-102-0/+24
| | | | | | | | | | | $ sudo ./test/wacom-test-env.sh $ pytest A lot easier this way than having to manually set the environment variables. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Aaron Skomra <aaron.skomra@wacom.com>
* Document the rotation/wheel axes, they're not what you'd expectPeter Hutterer2022-05-101-2/+2
| | | | | | | | | For historical reasons, the rotation axis is actually the cursor rotation only, the artpen rotation is mixed in with the airbrush wheel (which is scaled in to the rotation range). Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Aaron Skomra <aaron.skomra@wacom.com>
* Add a few missing breaks for the default casePeter Hutterer2022-05-101-0/+7
| | | | | Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Aaron Skomra <aaron.skomra@wacom.com>
* Make a debug message easier to understandPeter Hutterer2022-05-101-1/+1
| | | | | | | | We printed the device type as "tool id", let's print both but with the right naming. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Aaron Skomra <aaron.skomra@wacom.com>
* Allow negative panscroll threshold for inverted scrollingJason Gerecke2022-04-142-6/+11
| | | | | | | | | | | | | | | | | | | | | | | The driver's "pan" feature allows you to send scroll events by holding down a defined stylus button and dragging the pen. Dragging the pen from top to bottom will cause the driver to send scroll-up events, and vice-versa. This simulates physically dragging the page under the cursor and works particularly well with display tablets. The rate at which scroll events are sent is controlled by comparing the distance the pen has moved "down" to a defined threshold value. If the distance exceeds the threshold a scroll-up event is sent; if it exceeds the the threshold * -1 a scroll-down event is sent. This commit allows the driver to accept negative threshold values to produce an inverted scrolling behavior (i.e. dragging the pen from top to bottom causes scroll-down events instead of scroll-up). To do this we just relax the checks performed at device configuration and property setting (affecting the "PanScrollThreshold" driver option and "Wacom Panscroll Threshold" Xinput property, respectively). Link: https://github.com/linuxwacom/xf86-input-wacom/issues/257 Signed-off-by: Jason Gerecke <jason.gerecke@wacom.com>
* meson.build: comment out -Wall -WextraPeter Hutterer2022-02-241-2/+2
| | | | | | These are handled as part of meson's warning_level project option Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
* meson: use gnu_symbol_visibility - sort-ofPeter Hutterer2022-02-241-2/+7
| | | | | | | | | | | | | | | meson has gnu_symbol_visibility which is set correctly depending on the compiler. Except - where the X server was built with a symbol-visibility-supporting compiler it will always force -fvisibility=hidden into the cflags, see https://gitlab.freedesktop.org/xorg/xserver/-/issues/1316 Meson sorts pkgconf cflags after the gnu_symbol_visibility flag so the pkgconf cflag overrides our gnu_symbol_visibility flag. Make a note on this so no-one else has to spend time wondering about and debugging this. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
* meson.build: only build libgwacom.so, not the static onePeter Hutterer2022-02-241-1/+1
| | | | | | We don't need the static one Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
* Enable additional compiler warnings by defaultJason Gerecke2022-02-223-5/+13
| | | | | | | Removes the two `-Wno-xxxx` directives from out default set of build flags enables several new warnings as well. Signed-off-by: Jason Gerecke <jason.gerecke@wacom.com>
* Move -Wall and -Wextra from Github-only to default CFLAGSJason Gerecke2022-02-223-1/+5
| | | | | | | | | These two options were previously only being used by the Github runner. Lets move them to configure.ac / meson.build so that we encounter these warnings on our build system **before** pushing things to Github. The only thing Github should have is `-Werror` and friends. Signed-off-by: Jason Gerecke <jason.gerecke@wacom.com>
* autotools: Use the same set of CFLAGS as Meson buildsJason Gerecke2022-02-225-12/+91
| | | | | | | | | When building with Meson, a number of CFLAGS are automatically used if supported by the compiler. Lets copy them over so that the same behavior will occur for autotools users. While we're at it, update the other target-specific flags to also better match Meson. Signed-off-by: Jason Gerecke <jason.gerecke@wacom.com>
* Remove superflous 'invalid' label in wcmSetFlagsJason Gerecke2022-02-221-8/+4
| | | | | | | This label is only taken in a single error case. We should handle the error at the point we detect it, not after jumping to yet another label. Signed-off-by: Jason Gerecke <jason.gerecke@wacom.com>
* Avoid truncated output warning in wcmAxisDumpJason Gerecke2022-02-221-3/+5
| | | | | | | | | | GCC seems to be confused by our code pattern and insists that our buffer isn't large enough (no matter how large we might make it) and may result in truncated snprintf output. Modify the structure to achieve the same effect in a different way that GCC doesn't mind. Signed-off-by: Jason Gerecke <jason.gerecke@wacom.com>
* Correct buffer size passed to wcmAxisValueJason Gerecke2022-02-221-1/+1
| | | | | | | | | Thankfully the incorrect `sizeof(data)` is less than the actual `sizeof(value)`, so there's no chance of some kind of buffer overflow in the existing code. Fixes: e8015b67000b ("Revamp debug printing of axis data") Signed-off-by: Jason Gerecke <jason.gerecke@wacom.com>
* Fix sign-compare warnings caused by clang's integer abs()Jason Gerecke2022-02-221-6/+6
| | | | Signed-off-by: Jason Gerecke <jason.gerecke@wacom.com>
* wacom-record: Change syntax for null struct initalizationJason Gerecke2022-02-221-1/+1
| | | | | | | Avoid a -Wmissing-field-initializers warning from Clang, which apparently recognizes `{ 0 }` and `{ }` as valid patterns, but not `{ NULL }`. Signed-off-by: Jason Gerecke <jason.gerecke@wacom.com>
* wacom-record: Print unsigned values with %u rather than %dJason Gerecke2022-02-221-8/+8
| | | | Signed-off-by: Jason Gerecke <jason.gerecke@wacom.com>
* Explicitly check for WTYPE_INVALID in switch statementsJason Gerecke2022-02-222-0/+2
| | | | | | Avoid a Wswitch-enum warning. Signed-off-by: Jason Gerecke <jason.gerecke@wacom.com>
* Misc. unsigned warning fixesJason Gerecke2022-02-223-4/+7
| | | | | | Address a few more unsigned changes that don't fit in elsewhere. Signed-off-by: Jason Gerecke <jason.gerecke@wacom.com>