| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
| |
If curl encounters an error trying to download the Coverity build script
(as seems to be happening at the moment due to SSL issues), we will not
be notified since the pipe swallows the error code. This is not ideal, so
this commit updates the Travis build steps to use a slightly more contrived
construction which will get and then execute the script as independent steps.
Also, to ensure curl returns an error code even in less-severe cases (e.g. a
basic 404 "Not Found") we add the '-f' option.
Signed-off-by: Jason Gerecke <jason.gerecke@wacom.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The usbChooseChannel function is responsible for finding the channel
that should be used to contain a sequence of events for a particular
tool/contact. If a tool/contact is already using a particular channel
(i.e., the last event in the channel has the correct device type, serial
number, and is in proximity) then usbChooseChannel will return that
channel. Otherwise, usbChooseChannel will try to find a free channel
(i.e., one which is out of proximity) to be used to store the tool's
sequence of events.
The existing logic has a subtle bug that may result in a malfunction
when a specific condition occurs. In particular, if a multitouch report
from the kernel contains an existing contact going up followed by a
brand new contact, then usbChooseChannel will see the channel associated
with the former contact as free and begin using it to store data for the
new contact. As a result, the "up" event is never sent and can lead to
further strange touch behavior (including the effective disabling of
touch input).
To fix this, we modify usbChooseChannel to consider the "valid" state as
well as the working state when finding a new channel. A channel should
not be considered free if its valid state is still in prox, since this
indicates that the channel has *just* left prox. Note that we cannot
rely on only checking the valid state since this fails in the opposite
way: usbChooseChannel would not notice when a channel has *just* entered
prox and would overwrite its contents.
It isn't obvious wether it is also necessary to check the valid state
for the other two cases in this function (finding an existing channel
and forcefully clearing channels when out of space). The existing code
seems to work, however, so we will leave it as-is.
Ref: https://sourceforge.net/p/linuxwacom/bugs/335/?limit=25&page=1#73fe
Ref: https://sourceforge.net/p/linuxwacom/bugs/339/#f940
Ref: https://sourceforge.net/p/linuxwacom/bugs/349/
Signed-off-by: Jason Gerecke <jason.gerecke@wacom.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
|
|
|
|
|
|
|
|
|
| |
Refactoring in (527fa95c29) introduced a typo in wcmFilterCoord which
resulted in the value of tilt x being assigned to tilt y.
Ref: https://github.com/linuxwacom/xf86-input-wacom/issues/11
Fixes: 527fa95c29 ("Refactor coordinate averaging to seperate function")
Signed-off-by: Daniel Ferguson <danielferguson@me.com>
Signed-off-by: Jason Gerecke <jason.gerecke@wacom.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
|
|
|
| |
Signed-off-by: Ping Cheng <ping.cheng@wacom.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
|
|
| |
Signed-off-by: Jason Gerecke <killertofu@gmail.com>
|
|
|
|
|
|
|
|
|
|
| |
Require at least 1 of Github/Sourceforge.
Ref: https://github.com/linuxwacom/xf86-input-wacom/issues/10
Signed-off-by: Aaron Armstrong Skomra <skomra@gmail.com>
Reviewed-by: Ping Cheng <ping.cheng@wacom.com>
Reviewed-by: Jason Gerecke <jason.gerecke@wacom.com>
|
|
|
|
|
| |
Signed-off-by: Aaron Armstrong Skomra <skomra@gmail.com>
Reviewed-by: Jason Gerecke <jason.gerecke@wacom.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The Pro Pen 3D includes a third stylus button, reported from the kernel
as BTN_STYLUS3. Support for this event was added earlier, but the number
of buttons allocated was not updated. This meant that although the X
driver would properly set the button flag bit to indicate that a button
should be sent, a userspace event wouldn't actually be sent. This commit
increases the number of buttons allocated, causing the third button to
emit X11 button number 8 when pressed. This button can also be configured
through xsetwacom now that the driver allocates the correct number.
Fixes: 4a96a58f26 ("Add support for kernel's new BTN_STYLUS3 event")
Signed-off-by: Jason Gerecke <jason.gerecke@wacom.com>
Reviewed-by: Ping Cheng <ping.cheng@wacom.com>
|
|
|
|
|
| |
Signed-off-by: Jason Gerecke <jason.gerecke@wacom.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
|
|
|
| |
Signed-off-by: Jason Gerecke <jason.gerecke@wacom.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The HAL daemon used by RHEL6/CentOS6 does not play nicely with input
devices that advertise unsupported EV_SW events. Devices with such
an event will fail in the middle of the probe process, preventing
the X server from being able to hotplug the device. The SW_MUTE_DEVICE
event used by the Cintiq Pro touchscreen is such an event.
To work around this limitation, we can define an fdi configuration file
which resets the "button.has_state" property prior to probe. Because
HAL only runs the failing code when this property is true, the device
is able to finish the probe process just as though it never had the
unsupported switch in the first place. Resetting this property does
prevent HAL from being able to monitor the switch state, but that is
not considered a problem.
Since HAL is long-since deprecated, it doesn't make sense to install
this configuration file on systems which don't require it. This
commit also adds logic to configure.ac so that only systems which still
use HAL will install this file.
Signed-off-by: Jason Gerecke <jason.gerecke@wacom.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The wcmLinkTouchAndPen function is responsible for associating the pen and
touch interfaces of a tablet. This association can be tripped up if multiple
devices with the same name are connected, so it includes code to prevent
linking to a device which already has been linked up. However, the condition
also checks that the device being considered is a tablet (i.e., stylus/eraser/
cursor; not pad/touch). This latter check seems nonsensical: it allows devices
to link to the first touch device they find, even if that device is already
linked up.
Disallowing multiple links to the same device prevents all three pen/touch/pad
devices from having wcmTouchDevice set up, however. Leaving the stricter
condition as-is could cause devices to be linked up incorrectly (e.g. if the
X server has {touch1, pen1, pad1, touch2, pen2, pad2}, then touch1 and pen1
would get linked, but pad1 and touch2 would get linked, and pen2/pad2 left
unlinked!). To prevent this, we disallow linking of pad interfaces, which
should not be a problem since the pad shouldn't need to use the wcmTouchDevice
variable.
Fixes: 8bb519ef2b ("Update wcmTouchDevice for touch interface")
Signed-off-by: Jason Gerecke <jason.gerecke@wacom.com>
|
|
|
|
|
|
|
|
|
| |
When enabled through `xsetwacom set <id> button <n> pan`, this causes the driver
to appear to "drag" scrollable window contents by emitting appropriate scroll
events as the pen is dragged around.
Signed-off-by: Jason Gerecke <jason.gerecke@wacom.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
|
|
|
|
|
|
|
| |
This commit refactors the signature of the sendAction function to take a
WacomDeviceState pointer. This change makes it easier to implement the
following pan/scroll patch.
Signed-off-by: Jason Gerecke <jason.gerecke@wacom.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
|
|
|
|
|
|
|
|
|
|
| |
If something goes wrong when a tool attempts to open a device, we print
an error but then continue on as though nothing happended and provide
the fd to both the ioctl() and close() functions. This commit ensures
we don't actually try to use the fd.
Coverity-id: 208168
Fixes: 3546d8ab1b ("tools: add isdv4-serial-debugger test program.")
Signed-off-by: Jason Gerecke <jason.gerecke@wacom.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
|
|
|
|
|
|
|
|
| |
Adds the ability to run a Coverity scan from Travis. Since there are a
limited number of times per week that Coverity can be used, we only
run it when Travis has the DO_COVERITY environment variable set to "YES".
This can either be set manually through the Travis' interface, but will
also be set for cron-triggered jobs.
Signed-off-by: Jason Gerecke <jason.gerecke@wacom.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Coordinate averaging is useful for producing smooth strokes, but this
averaging can cause button events to be sent at the wrong location.
In particular, when making a series of quick strokes with an AES pen,
the actual location the pen contacts the display can be some distance
away from the first (low-quality) position report. This can result in
"hook" artifacts if it is still influencing the averaged pointer
position when the pen goes down. This can also be seen if the RawSample
parameter is increased significantly.
To prevent these artifacts from appearing, we reset the averaging filter
whenever the tip is pressed. This ensures that the event event is sent
at the pen's actual location, plus or minus some (probably smaller) noise.
In theory these artifacts could still appear if drawing were triggered
by a button other than the tip, but that would be a quite non-standard
setup.
https://sourceforge.net/p/linuxwacom/bugs/338/
Signed-off-by: Jason Gerecke <jason.gerecke@wacom.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Resolves the following compile-time warning:
../src/wcmCommon.c: In function ‘wcmEvent’:
../src/wcmCommon.c:1007:23: error: ‘suppress’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
commonDispatchDevice(pInfo, pChannel, suppress);
^
Fixes: 2fa4ef48c9 ("Do not overwrite raw device state with filtered coordinate values")
Signed-off-by: Jason Gerecke <jason.gerecke@wacom.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
By performing coordinate filtering in wcmEvent and overwriting the raw
device state stored in pChannel, we loose the ability to see the actual
(but noisy) hardware coordinates at later points in the code. By moving
this filtering into commonDispatchDevice we can apply the result to only
the 'filtered' DeviceState sample that is ultimately passed along to
wcmSendEvents.
Signed-off-by: Jason Gerecke <jason.gerecke@wacom.com>
Reviewed-by: Ping Cheng <ping.cheng@wacom.com>
|
|
|
|
|
|
|
|
| |
Moves the averaging code used by the driver's filter functions into a
seperate function to make the operation of wcm_filter_coord more clear.
Signed-off-by: Jason Gerecke <jason.gerecke@wacom.com>
Reviewed-by: Ping Cheng <ping.cheng@wacom.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Currently the driver uses macros like PACKAGE_VERSION whenever it needs
to print out a version string. These macros are only updated whenever
the autoconf.sh script is run, however. As a practical result, this means
that the version information which is built into development versions of
the driver is often inaccurate. To fix this, we define a new BUILD_VERSION
macro which is updated whenever git reports a changed version number.
In addition to having `xsetwacom -V` report the precise build, we also
have the X log print out the build number to augment the MAJOR/MINOR/PATCH
data that is normally printed.
Signed-off-by: Jason Gerecke <jason.gerecke@wacom.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The Makefile.am contained under the tools subdirectory makes use of an
Automake feature that allows the definition of per-executable CFLAGS.
These CFLAGS definitions do not automatically include the general-use
AM_CFLAGS. This has resulted in these executables not being built with
the intentended warnings/errors enabled. Note that we also explicitly
add "-Wno-error" to the definition of the "xsetwacom-test" binary since
we don't want warnings there to break anything.
Signed-off-by: Jason Gerecke <jason.gerecke@wacom.com>
Reviewed-by: Ping Cheng <ping.cheng@wacom.com>
|
|
|
|
|
|
|
|
|
|
| |
The missing-field-initializers cast-qual warnings had to be excepted out
from the Travis build since code in xsetwacom would trigger them. These
issues have been resolved by the last two commits, allowing us to remove
the exceptions.
Signed-off-by: Jason Gerecke <jason.gerecke@wacom.com>
Reviewed-by: Ping Cheng <ping.cheng@wacom.com>
|
|
|
|
|
|
|
|
|
| |
GCC warns that we're droping the "const" attribute in one of our casts.
Looking at the affected function, it is obvious that the cast is entirely
unnecessary and can be dropped entirely.
Signed-off-by: Jason Gerecke <jason.gerecke@wacom.com>
Reviewed-by: Ping Cheng <ping.cheng@wacom.com>
|
|
|
|
|
|
|
|
|
|
| |
C does not strictly allow an empty initializer list `{}`, which can
result in missing-field-initializers warnings from the compiler. All
consumers of this array cycle through until they see a NULL name, so
this commit replaces the empty initializer with { .name = NULL }.
Signed-off-by: Jason Gerecke <jason.gerecke@wacom.com>
Reviewed-by: Ping Cheng <ping.cheng@wacom.com>
|
|
|
|
|
|
|
|
|
|
|
| |
Adds a .travis.yml file which allows the Travis-CI service to build and
test the project. This should ensure we're immediately warned of potential
issues even if someone forgets to run the test suite before pushing. The
build is performed with "-Wall -Wextra -Werror" (with only a handful of
currently-necessary exceptions) on both GCC and Clang.
Signed-off-by: Jason Gerecke <jason.gerecke@wacom.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
|
|
|
|
|
|
|
|
|
| |
BTN_STYLUS3 was (will be) added to the Linux 4.15 kernel to support the
third button present on Wacom's "Pro Pen 3D" stylus. This commit adds
support for this new event, mapping it to mouse button 8 ("navigate
back"). Remapping this button to a different function is possible by
using commands like `xsetwacom set <id> button 8 <action>`.
Signed-off-by: Jason Gerecke <jason.gerecke@wacom.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
|
|
|
|
|
|
|
|
|
|
| |
The Dell canvas 27 is an external monitor with pen and touch, but the
pen is provided by Wacom, and the touch by Advanced Silicon.
To have proper touch arbitration, we need to force xf86-input-wacom
to also handle the touch part.
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
Reviewed-By: Jason Gerecke <jason.gerecke@wacom.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
|
|
|
|
|
|
|
|
|
|
| |
The table of keysyms does not include an obvious synonym for the "AltGr"
key that is found on some international keyboard layouts. It seems that
"ISO_Level3_Shift" is the magic name that should typically be used.
https://sourceforge.net/p/linuxwacom/bugs/344/
Signed-off-by: Jason Gerecke <jason.gerecke@wacom.com>
Reviewed-by: Ping Cheng <ping.cheng@wacom.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The device flags set in wcmDeviceTypeKeys must be set properly in order
for the driver to correctly identify and use specific tablet features.
Several devices are missing flags that e.g. indicate they support
pen rotation or have touch rings.
Fixes: 0318b1c ("Support recent display devices on older kernels")
Fixes: 3578b91 ("Add support for Cintiq 22HDT and 13HD, DTK2241 and DTH2242.")
Fixes: df7f165 ("Add tablet_type to WacomModel")
Signed-off-by: Jason Gerecke <jason.gerecke@wacom.com>
Reviewed-by: Ping Cheng <ping.cheng@wacom.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
This tablet is usable without this patch, but the device type is missing
the WCM_RING flag. This prevents the ring valuator from being initialized
correctly, and in turn causes recent versions of gnome-control-center to
not allow configuration of the ring.
https://bugzilla.gnome.org/show_bug.cgi?id=785358
Signed-off-by: Jason Gerecke <jason.gerecke@wacom.com>
Reviewed-by: Ping Cheng <ping.cheng@wacom.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
If the device is unplugged, the fd triggers in select/poll/... but comes back
with ENODEV. This triggers a lot of error messages in the log until finally
the udev code catches up with us and the device is removed properly.
Catch that case by removing the fd from the select() set so we don't get
triggered to call read_input on it anymore.
https://sourceforge.net/p/linuxwacom/bugs/337/
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Tested-by: crocket <crockabiscuit@gmail.com>
Reviewed-by: Ping Cheng <ping.cheng@wacom.com>
|
|
|
|
|
| |
Signed-off-by: Aaron Armstrong Skomra <aaron.skomra@wacom.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
|
| |
|
|
|
|
| |
Signed-off-by: Jason Gerecke <jason.gerecke@wacom.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Commit d958ab79d2 changes the driver's pressure normalization functions
to use a variable "maxCurve" which defines the upper limit of pressure
values to be emitted by the driver, rather than using FILTER_PRESSURE_RES
directly. The tests were never updated to take this into account and
fail due to maxCurve never being set.
This patch has the normalize_pressure test set the value of maxCurve.
While we're at it, we have the test verify that multiple values of
maxCurve work as expected.
Fixes: d958ab79d2 (Introduce "Pressure2K" config option for incompatible software)
Signed-off-by: Jason Gerecke <jason.gerecke@wacom.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
It appears that some software may not be entirely compatible with the
expanded 65K pressure level range that was introduced in version 0.34.0.
Although our driver advertises the larger range in XI2 (and toolkits
like GTK+2/3 and Qt3/4/5 make use of it), there have been reports of
other software (e.g. The Foundry's "NUKE") misbehaving.
As a workaround, this patch introduces a new boolean config option named
"Pressure2K". If enabled, it causes the driver to revert to its prior
behavior of using a pressure range of 0-2047. This option is disabled by
default, but can be turned on by adding the following configuration
snippet to a new file in the /etc/X11/xorg.conf.d directory:
Section "InputClass"
Identifier "Wacom pressure compatibility"
MatchDriver "wacom"
Option "Pressure2K" "true"
EndSection
Ref: https://sourceforge.net/p/linuxwacom/mailman/message/35857403/
Ref: 3e56ce4429 (Increase full-scale pressure range from 0..2047 to 0..65535)
Signed-off-by: Jason Gerecke <jason.gerecke@wacom.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
|
|
|
|
|
|
|
| |
Older kernels like 2.6.30 will end up with touches
interpreted as relative events unless these devices
are explicitly added.
Signed-off-by: Aaron Armstrong Skomra <aaron.skomra@wacom.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
|
|
|
|
|
|
|
|
|
|
| |
XkbGetMap is more robust in cases where certain keyboard description components
are missing. XkbGetKeyboard will fail when any component cannot be resolved;
since XkbAllComponentsMask is requested, any missing component will result in
the call returning NULL. Since we don’t necessarily need all components (e.g.,
keyboard geometry, keymap names), we use XkbGetMap instead.
Signed-off-by: Sebastian Reuße <seb@wirrsal.net>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
|
|
|
|
|
| |
Introduced in de650d6224
Reported-by: Matt Turner <mattst88@gmail.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
|
|
| |
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
|
|
|
|
| |
Fixes distcheck
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
|
|
| |
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
|
|
|
|
|
|
|
| |
Otherwise we run the risk of having a timer trigger after we removed the
device. Since we pass InputInfoPtrs and WacomDevicePtrs to the timers as
arguments, these may have been freed by the time a timer triggers.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Acked-by: Jason Gerecke <jason.gerecke@wacom.com>
|
|
|
|
|
|
|
|
|
|
|
| |
This was required when we only had the SIGIO handler because sending events
allocates memory and things break. Now with the input thread we *can* send
events from within the thread but it can mess up other delivery.
https://bugs.freedesktop.org/show_bug.cgi?id=99887
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Acked-by: Jason Gerecke <jason.gerecke@wacom.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The wcmIsSiblingDevice function uses several tricks to try and determine
if two devices should be considered siblings. If its 'logical_only'
parameter is false, this includes comparing device names. Device name
comparison is complicated by the fact that suffixes are added on by
the X and kernel drivers. To deal with this, the wcmSplitName function
tries to split a device name into three pieces: its "basename" that
describes the model, its "subdevice" name that describes the interface,
and its "tool" name which describes the X11 tool.
Spliting the name is a somewhat kludgy process which does not properly
handle the device names for the MobileStudio Pro or Cintiq Pro. The
kernel reads the name of these devices directly from the hardware's
descriptors, and the names are slightly different between the pen and
touch interfaces (the touch device has an extra "Touch" suffix).
This patch tweaks how wcmSplitName breaks apart device names in order
to handle the MobileStudio Pro and Cintiq Pro. Specifically, it now
allows the "subdevice" to contain an arbitrary number of "Pen", "Finger",
:Touch", or "Pad" suffixes. For the MobileStudio Pro and Cintiq Pro,
this should allow the "basename" that is considered for sibling device
matches to be identical between both the pen and touch interfaces.
Signed-off-by: Jason Gerecke <jason.gerecke@wacom.com>
Signed-off-by: Ping Cheng <ping.cheng@wacom.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
|
|
|
|
|
|
|
|
|
|
| |
The X server recently deprecated xf86BlockSIGIO and xf86UnblockSIGIO and
simultaneously defined them inline within xf86.h. The new inline definition
causes problems both because fake-symbols.c will end up redefining them,
and because the function bodies reference a symbol that does not get included
when building the tests. To fix these errors, update fake-symbols.c with
updated include guards and a definition of the undefined symbols.
Signed-off-by: Jason Gerecke <jason.gerecke@wacom.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
|
|
| |
Signed-off-by: Jason Gerecke <killertofu@gmail.com>
|
|
|
|
| |
Signed-off-by: Jason Gerecke <killertofu@gmail.com>
|