| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
|
|
|
|
|
| |
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>
|
| |
|
|
|
|
| |
ValuatorMask has been around since xserver 1.10, released in 2011.
|
|
|
|
| |
See https://github.com/linuxwacom/xf86-input-wacom/pull/222#discussion_r897908702
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
| |
The function moved away in e4ea35d56aec59a5de0ef3d9282fdd796d89e6ad,
let's drop this comment.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
|
|
| |
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
| |
Might as well not accidentally commit this one
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
| |
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
| |
Might as well collect as much data as we can get
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
| |
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
| |
$ 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>
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
| |
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Aaron Skomra <aaron.skomra@wacom.com>
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
| |
These are handled as part of meson's warning_level project option
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
| |
We don't need the static one
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
| |
Signed-off-by: Jason Gerecke <jason.gerecke@wacom.com>
|
|
|
|
|
|
|
| |
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>
|
|
|
|
| |
Signed-off-by: Jason Gerecke <jason.gerecke@wacom.com>
|
|
|
|
|
|
| |
Avoid a Wswitch-enum warning.
Signed-off-by: Jason Gerecke <jason.gerecke@wacom.com>
|
|
|
|
|
|
| |
Address a few more unsigned changes that don't fit in elsewhere.
Signed-off-by: Jason Gerecke <jason.gerecke@wacom.com>
|