summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2013-04-29wacom 0.21.0Jason Gerecke1-1/+1
Signed-off-by: Jason Gerecke <killertofu@gmail.com>
2013-04-19wacom 0.20.99.1Jason Gerecke1-1/+1
Signed-off-by: Jason Gerecke <killertofu@gmail.com>
2013-04-18Fix const warnings in wcmSetActionPropertyJason Gerecke1-1/+1
CC wcmXCommand.lo ../../src/wcmXCommand.c: In function 'wcmSetActionProperty': ../../src/wcmXCommand.c:460:23: warning: assignment discards 'const' qualifier from pointer target type [enabled by default] case BadMatch: msg = "BadMatch"; break; ^ ../../src/wcmXCommand.c:461:23: warning: assignment discards 'const' qualifier from pointer target type [enabled by default] case BadValue: msg = "BadValue"; break; ^ ../../src/wcmXCommand.c:462:17: warning: assignment discards 'const' qualifier from pointer target type [enabled by default] default: msg = "UNKNOWN"; break; ^ Signed-off-by: Jason Gerecke <killertofu@gmail.com>
2013-04-18Remove unused variableJason Gerecke1-1/+0
src/wcmUSB.c:451:14: warning: unused variable 'private' [-Wunused-variable] wcmUSBData* private = common->private; Signed-off-by: Jason Gerecke <killertofu@gmail.com>
2013-04-10Correct comment for Sample and Suppress propertyPeter Hutterer1-1/+1
The data in the property is actually the other way round. Oops. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2013-03-11add support for 0x10dPing Cheng2-0/+2
It is a Wacom device found in Fujitsu Lifebook T902. Signed-off-by: Stephan Frank <sfrank@cs.tu-berlin.de> Acked-by: Ping Cheng <pingc@wacom.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Jason Gerecke <killertofu@gmail.com>
2013-03-11Resume button events for pucksPing Cheng1-4/+5
wcmBTNChannel was statically assigned to PAD_CHANNEL by commit 1f9bf45b, which excluded button events for CURSOR tools. This patch allows usbParseBTNEvent to process button events for both CURSOR and PAD tools. wcmBTNChannel is removed from wcmUSBData since we do not need it anymore. Signed-off-by: Ping Cheng <pingc@wacom.com> Reviewed-by: Jason Gerecke <killertofu@gmail.com>
2013-03-06Make touchscreens (WCM_LCD) direct touch devicesJan Alexander Steffens (heftig)1-1/+4
Tested with a tablet pc, allowing finger scrolling in GTK3. Signed-off-by: Jan Alexander Steffens (heftig) <jan.steffens@gmail.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Tested-by: Jason Gerecke <killertofu@gmail.com>
2013-03-06Consolidate calls to wcmEvent into one statementPing Cheng1-13/+0
The extra wcmEvent call was to deal with generic PAD events received without motion events in the same packet. Those PAD events would be filtered out by the device type retrieving code later. Signed-off-by: Ping Cheng <pingc@wacom.com> Acked-by: Chris Bagwell <chris@cnpbagwell.com> Reviewed-by: Jason Gerecke <killertofu@gmail.com>
2013-03-06Clean up device_type initialization for tool on tabletPing Cheng1-54/+5
usbInitToolType retrieves device type from the kernel when tool is on the tablet at X server startup. No need to do it again later. Since kernel does not have a specific device type for PAD, we have to check the actual events to set its type. Signed-off-by: Ping Cheng <pingc@wacom.com> Acked-by: Chris Bagwell <chris@cnpbagwell.com> Reviewed-by: Jason Gerecke <killertofu@gmail.com>
2013-03-06Update MAX_CHANNELS definitionPing Cheng1-3/+3
Make room to report pen and touch events simultaneously Signed-off-by: Ping Cheng <pingc@wacom.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Jason Gerecke <killertofu@gmail.com>
2013-03-05Handle DEVICE_ABORT on input ABI 19.1Peter Hutterer1-1/+4
And do nothing. USB devices are handled by the kernel, so we don't need to reset the HW. ISDV4 devices don't get reset on normal shutdown anyway, so we don't need to do anything here either. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2013-03-04wacom 0.20.0Jason Gerecke1-1/+1
Signed-off-by: Jason Gerecke <killertofu@gmail.com>
2013-02-26wacom 0.19.99.1Jason Gerecke1-1/+1
Signed-off-by: Jason Gerecke <killertofu@gmail.com>
2013-02-26Fix warning: format expects argument of typeJason Gerecke1-1/+1
../src/wcmXCommand.c: In function 'wcmCheckActionProperty': ../src/wcmXCommand.c:387:3: warning: format '%d' expects argument of type 'int', but argument 4 has type 'long int' [-Wformat] Signed-off-by: Jason Gerecke <killertofu@gmail.com>
2013-02-26Support pen/touch arbitration across product idsPing Cheng1-6/+34
Devices with different product ids for pen and touch, such as Cintiq 24HD and DTH 2242, were added recently. Applying arbitration only for tools with same product id is not enough. However, we want to make sure tools with same product id are lined properly first. That's why the same routine is repeated instead of combined. Signed-off-by: Ping Cheng <pingc@wacom.com> Reviewed-by: Jason Gerecke <killertofu@gmail.com>
2013-02-26Arbitration applies to puck/Wacom mouse as wellPing Cheng4-20/+22
We do not allow finger competes with CURSOR. Signed-off-by: Ping Cheng <pingc@wacom.com> Reviewed-by: Jason Gerecke <killertofu@gmail.com>
2013-02-26Fix pen and touch arbitrationPing Cheng1-3/+2
Arbitration did not work as expected since common is meant for tools on the same logical port, not for tools of the same physical device or of the same product id. Plus, not all devices support touch. Signed-off-by: Ping Cheng <pingc@wacom.com> Acked-by: Jason Gerecke <killertofu@gmail.com>
2013-02-11Don't reset properties on checkonlyJason Gerecke1-9/+12
We shouldn't make *any* change to the state if checkonly==true, but we've been resetting properties anyway. This blocks off the calls to the reset functions to prevent them from being called if it's just a drill. Signed-off-by: Jason Gerecke <killertofu@gmail.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2013-01-30Add Touch option to xsetwacom manpagePing Cheng2-3/+8
We did not explicitly add this option when worked on the manpage since we thought Gnome control center (g-c-c) or something else in userland would take care of touch (as well as its gestures). However, I see no sign of getting touch in g-c-c soon. Let's take care of touch uers here for now. Wacom manpage is also updated accordingly. Reported-by: Nikolai Neff <gefrierbrand@users.sf.net> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Ping Cheng <pinglinux@gmail.com>
2013-01-24include: Move wacom-util.h after X11 headersJason Gerecke1-1/+2
Combined with the "#ifndef" in commit c95c1f2c, this fixes the compiler warnings generated about ARRAY_SIZE being redefined. Signed-off-by: Jason Gerecke <killertofu@gmail.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2013-01-24Have wcmFindActionHandler return success/failure directlyJason Gerecke1-6/+9
We can guarantee that the out arguments are non-NULL if the property was found, so return a boolean instead of relying on the caller to check for non-NULL results. Signed-off-by: Jason Gerecke <killertofu@gmail.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2013-01-23NONE is not a valid action, and NULL a bad valueJason Gerecke1-8/+15
While the NONE Atom indicates that the driver should reset the action at the index it resides it, it is not *itself* a valid action. This patch prevents us from attempting to set NONE as an action. Signed-off-by: Jason Gerecke <killertofu@gmail.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2013-01-23Have wcmSetActionProperty run checkonlyJason Gerecke1-34/+29
Instead of checking only the 'actions' property, also check the individual 'action' properties as well. We obviously won't be able to correctly apply the former if the latter fails midway through. Signed-off-by: Jason Gerecke <killertofu@gmail.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2013-01-23Pass errors from wcmSetActionProperty up the stackJason Gerecke1-1/+3
Errors when setting an action property should not be swallowed. Note that because the containing function does not bother to call this function 'checkonly', clients still can't find out about errors until its too late. We'll fix this in the next commit. Signed-off-by: Jason Gerecke <killertofu@gmail.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2013-01-23Setting an invalid action property should return an errorPeter Hutterer1-1/+1
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Ping Cheng <pinglinux@gmail.com> Reviewed-by: Jason Gerecke <killertofu@gmail.com>
2013-01-23Have wcmFindActionHandler properly handle wcmFindProp errorJason Gerecke1-1/+1
If wcmFindProp cannot find the given property, it will return a negative error code. At the moment, this is taken as the success condition(!?) for the strip_actions case... Aside from being wrong, this has the potential to cause some nasty memory corruption. Signed-off-by: Jason Gerecke <killertofu@gmail.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2013-01-23Improve wcmFindProp readabilityJason Gerecke1-5/+2
The existing code is needlessly hard to follow. It should return immediately upon success, and unconditionally bail if it never succeeded. Signed-off-by: Jason Gerecke <killertofu@gmail.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2013-01-23Increase maximum allowed X11 button numberJason Gerecke2-2/+3
Actions specify X11 button numbers that should be generated when performed. The maximum button number that could be used in an event has been raised from the driver-imposed limit (WCM_MAX_BUTTON) to the server-imposed limit (WCM_MAX_X11BUTTON). This feature is necessary for gnome-settings-daemon to work properly. To reliably identify each touch strip and ring, g-s-d assigns each a high button numbers to send for each direction. Without this patch, the driver ignores the actions set by g-s-d and continues to send whatever the default action is instead. Signed-off-by: Jason Gerecke <killertofu@gmail.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2013-01-23Improve logging of X property settingJason Gerecke1-7/+38
Sprinkles a few extra DBG() calls into the code to make it a little easier to track down issues with property-setting code. Signed-off-by: Jason Gerecke <killertofu@gmail.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2013-01-22test: replace INCLUDES with AM_CPPFLAGSPeter Hutterer1-1/+1
see https://lists.gnu.org/archive/html/automake/2012-12/msg00038.html - Support for the long-deprecated INCLUDES variable will be removed altogether in Automake 1.14. The AM_CPPFLAGS variable should be used instead. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Acked-by: Ping Cheng <pinglinux@gmail.com>
2013-01-22Fix a debug message not parsed by sigsafe printf codePeter Hutterer1-1/+1
The server doesn't interpret %g, use %f instead. tbh, right now it doesn't interpret %f either, but there's patches on the way for that. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Acked-by: Ping Cheng <pinglinux@gmail.com>
2013-01-22Drop unused maxWidth/maxHeightPeter Hutterer2-6/+2
These two are never set to anything but 0 since xf86-input-wacom-0.10.10-19-g6f5f29b Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Ping Cheng <pinglinux@gmail.com>
2013-01-22Fix indentation in usbStart()Peter Hutterer1-9/+9
No functional changes. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2013-01-22include: don't redefine ARRAY_SIZEPeter Hutterer1-0/+2
The server provides this macro in its headers, so only redefine it where needed (for the tools) Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2013-01-02wacom 0.19.0Jason Gerecke1-1/+1
Signed-off-by: Jason Gerecke <killertofu@gmail.com>
2013-01-02Properly map 2nd abswheel of Cintiq 24HD touchJason Gerecke1-1/+2
Signed-off-by: Jason Gerecke <killertofu@gmail.com>
2012-12-19wacom 0.18.99.1Jason Gerecke1-1/+1
Signed-off-by: Jason Gerecke <killertofu@gmail.com>
2012-12-19If ds.device_type is 0, set it to the one we guessed earlierPeter Hutterer1-0/+7
priv->wcmDeviceType contains the guessed device type, after querying the key state from the kernel. If that found our device type, use it. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Tested-by: Jason Gerecke <killertofu@gmail.com>
2012-12-19Fix missing braces around condition in refreshDeviceTypePeter Hutterer1-1/+2
Causing this function to always return 0 Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Ping Cheng <pinglinux@gmail.com> Tested-by: Jason Gerecke <killertofu@gmail.com>
2012-12-19Handle BTN_TOOL_MOUSE/LENS in toolTypeToDeviceTypePeter Hutterer1-0/+4
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Ping Cheng <pinglinux@gmail.com> Tested-by: Jason Gerecke <killertofu@gmail.com>
2012-12-19Filter out DOUBLETAP and TRIPLETAP events for true MT dataPing Cheng1-0/+2
DOUBLETAP and TRIPLETAP are duplicated events in type-B MT format. We do not use them in this driver. Plus, they could be confused by fake MT events on older kernels. Signed-off-by: Ping Cheng <pinglinux@gmail.com>
2012-12-19Assign PAD_CHANNEL to BTNChannel for all PAD toolsPing Cheng1-5/+1
BTNChannel is static for all devices, not just geneic devices. Signed-off-by: Ping Cheng <pinglinux@gmail.com> Reviewed-by: Jason Gerecke <killertofu@gmail.com>
2012-12-18BTN_TOOL_FINGER is not for PAD if MT is supportedPing Cheng1-5/+8
BTN_TOOL_FINGER indicates single touch/first finger if MT is enabled Signed-off-by: Ping Cheng <pingc@wacom.com> Reviewed-by: Jason Gerecke <killertofu@gmail.com> Reviewed-by: Chris Bagwell <chris@cnpbagwell.com>
2012-12-18Send generic PAD events before other eventsPing Cheng1-0/+13
If we wait until we finish other verifications, we could miss PAD events since they will be filtered out when there are no motion events sent simultaneously. Signed-off-by: Ping Cheng <pinglinux@gmail.com> Acked-by: Jason Gerecke <killertofu@gmail.com>
2012-12-18Initialize wcmBTNChannel in usbWcmInitPadState()Ping Cheng1-5/+8
wcmBTNChannel is only used by generic PAD device. And it is statically assigned to PAD_CHANNEL. No need to reassign it for every packet. Signed-off-by: Ping Cheng <pinglinux@gmail.com> Acked-by: Jason Gerecke <killertofu@gmail.com> Reviewed-by: Chris Bagwell <chris@cnpbagwell.com>
2012-12-18Remove channel duplication code for generic devicesPing Cheng1-32/+2
We use true MT protocol for MT devices in kernel now. This code was introduced to deal with ABS_TOOL_*TAP events loss issue. It is uncessary any more. And its existence makes it hard to support generic PAD cleanly. Signed-off-by: Ping Cheng <pingc@wacom.com> Acked-by: Jason Gerecke <killertofu@gmail.com>
2012-12-11man: CursorProx affects absolute mode as wellPeter Hutterer1-1/+1
Update man-page for driver behavior. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Ping Cheng <pinglinux@gmail.com>
2012-12-06Convert resolution from points/inch to points/mPing Cheng1-1/+1
Somehow we forgot Lenovo W700 last round. Signed-off-by: Ping Cheng <pingc@wacom.com> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2012-12-06Update resoltuion for old kernelsPing Cheng1-2/+2
We upscaled resolutions in WacomModelDesc and reported from absinfos. But we forgot to update them for older kernels that do not support resolution in absinfo. Resolution received from kernel is in hundredths of a mm. The scale we use here is in meter. Signed-off-by: Ping Cheng <pingc@wacom.com> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>