summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
* Fix pen and touch arbitrationPing Cheng2013-02-261-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>
* Don't reset properties on checkonlyJason Gerecke2013-02-111-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>
* Add Touch option to xsetwacom manpagePing Cheng2013-01-302-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>
* include: Move wacom-util.h after X11 headersJason Gerecke2013-01-241-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>
* Have wcmFindActionHandler return success/failure directlyJason Gerecke2013-01-241-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>
* NONE is not a valid action, and NULL a bad valueJason Gerecke2013-01-231-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>
* Have wcmSetActionProperty run checkonlyJason Gerecke2013-01-231-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>
* Pass errors from wcmSetActionProperty up the stackJason Gerecke2013-01-231-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>
* Setting an invalid action property should return an errorPeter Hutterer2013-01-231-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>
* Have wcmFindActionHandler properly handle wcmFindProp errorJason Gerecke2013-01-231-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>
* Improve wcmFindProp readabilityJason Gerecke2013-01-231-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>
* Increase maximum allowed X11 button numberJason Gerecke2013-01-232-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>
* Improve logging of X property settingJason Gerecke2013-01-231-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>
* test: replace INCLUDES with AM_CPPFLAGSPeter Hutterer2013-01-221-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>
* Fix a debug message not parsed by sigsafe printf codePeter Hutterer2013-01-221-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>
* Drop unused maxWidth/maxHeightPeter Hutterer2013-01-222-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>
* Fix indentation in usbStart()Peter Hutterer2013-01-221-9/+9
| | | | | | No functional changes. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
* include: don't redefine ARRAY_SIZEPeter Hutterer2013-01-221-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>
* wacom 0.19.0xf86-input-wacom-0.19.0Jason Gerecke2013-01-021-1/+1
| | | | Signed-off-by: Jason Gerecke <killertofu@gmail.com>
* Properly map 2nd abswheel of Cintiq 24HD touchJason Gerecke2013-01-021-1/+2
| | | | Signed-off-by: Jason Gerecke <killertofu@gmail.com>
* wacom 0.18.99.1xf86-input-wacom-0.18.99.1Jason Gerecke2012-12-191-1/+1
| | | | Signed-off-by: Jason Gerecke <killertofu@gmail.com>
* If ds.device_type is 0, set it to the one we guessed earlierPeter Hutterer2012-12-191-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>
* Fix missing braces around condition in refreshDeviceTypePeter Hutterer2012-12-191-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>
* Handle BTN_TOOL_MOUSE/LENS in toolTypeToDeviceTypePeter Hutterer2012-12-191-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>
* Filter out DOUBLETAP and TRIPLETAP events for true MT dataPing Cheng2012-12-191-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>
* Assign PAD_CHANNEL to BTNChannel for all PAD toolsPing Cheng2012-12-191-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>
* BTN_TOOL_FINGER is not for PAD if MT is supportedPing Cheng2012-12-181-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>
* Send generic PAD events before other eventsPing Cheng2012-12-181-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>
* Initialize wcmBTNChannel in usbWcmInitPadState()Ping Cheng2012-12-181-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>
* Remove channel duplication code for generic devicesPing Cheng2012-12-181-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>
* man: CursorProx affects absolute mode as wellPeter Hutterer2012-12-111-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>
* Convert resolution from points/inch to points/mPing Cheng2012-12-061-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>
* Update resoltuion for old kernelsPing Cheng2012-12-061-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>
* Post maximum number of contacts to clientsPing Cheng2012-12-064-1/+11
| | | | | | | | Clients should know the maximum number of contacts a touch device support before they get touch events. Signed-off-by: Ping Cheng <pingc@wacom.com> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
* Properly clear action propertiesJason Gerecke2012-12-041-1/+1
| | | | | | | | | | | | What we want to do is clear all 256 steps of an individual action. What we were doing was clearing just the first step. As mentioned on the ArchWiki, this cuases the following behavior: $ xsetwacom --set <id> Button 1 "key a b c" # press button 1 -> abc $ xsetwacom --set <id> Button 1 "key d" # press button 1 -> dbc WRONG! Signed-off-by: Jason Gerecke <killertofu@gmail.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
* Add support for MT ISDv4 device 0x4001Ping Cheng2012-12-042-0/+2
| | | | | | | It supports up to 10 fingers Signed-off-by: Ping Cheng <pingc@wacom.com> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
* Support up to 16 touch pointsPing Cheng2012-11-261-1/+1
| | | | | | | | Bamboo3 and Intuos5 both support 16 fingers Signed-off-by: Ping Cheng <pingc@wacom.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
* Bring back AM_MAINTAINER_MODE, default to enabledPeter Hutterer2012-11-261-0/+1
| | | | | | | | | | | | | | | | | | See Ron's comments discussion on: http://old.nabble.com/-PATCH-libwacom--Drop-AM_MAINTAINER_MODE-td34561358.html Summary: In this workflow all generated files are committed to git to have a known working set. On checkout, git does not restore the original timestamps, so with maintainer-mode enabled, automake will regenerate the files - which is to be avoided since we already have the known working set. AM_MAINTAINER_MODE([enable]) gives us the same behaviour as now, but will allow Ron to disable the regeneration of the files. Requested-by: Ron <ron@debian.org> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Acked-by: Ping Cheng <pinglinux@gmail.com>
* Don't declare touch_mask on older serversJason Gerecke2012-11-131-0/+2
| | | | | | | Missed necessary preprocessor guard in 0d164e66. Signed-off-by: Jason Gerecke <killertofu@gmail.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
* wacom 0.18.0xf86-input-wacom-0.18.0Jason Gerecke2012-10-261-1/+1
| | | | Signed-off-by: Jason Gerecke <killertofu@gmail.com>
* Add three MT ISDv4 devices (E5, 100, 101)Ping Cheng2012-10-262-0/+6
| | | | Signed-off-by: <pinglinux@gmail.com>
* Have direct-touch devices move into and out of GESTURE_DRAG_MODEJason Gerecke2012-10-261-3/+8
| | | | | | | | | | | | | | | | | | | | | | | | Direct-touch devices (e.g. tablet PC, 24HD touch) are currently left in GESTURE_NONE_MODE while performing drags. This can lead to potential "stuck button" issues, since as soon as a second finger comes in contact, the driver will switch to GESTURE_LAG_MODE. This prevents the wcmSingleFingerPress function from being called, leaving button 1 in a pressed state. While any subsuquent gesture will release button 1, if the pen is brought into proximity before one occurs, the fingers will be sent out of proximity without a chance to release button 1. This causes the button to remain "stuck" in the pressed state until the next touch occurs. There are a few different ways this issue could be addressed. In the interest of symmetry with indirect-touch devices, this patch has direct-touch devices enter and exit GESTURE_DRAG_MODE as well. This delays the mode swith to GESTURE_LAG_MODE by one event, allowing wcmSingleFingerPress to be called to release button 1. https://bugs.freedesktop.org/show_bug.cgi?id=56308 Signed-off-by: Jason Gerecke <killertofu@gmail.com> Reviewed-by: Ping Cheng <pinglinux@gmail.com>
* If _source is NULL, don't auto-pick the type.Peter Hutterer2012-10-251-0/+3
| | | | | | | | | | | | | | | | | | | | | | | An xorg.conf InputDevice section that does not have Option Type set is invalid. Skip the type assignment and return, triggering an error about an invalid type lateron. Fixes crash triggered as of xf86-input-wacom-0.17.0-8-g0debde6 by having an InputDevice section like this: Section "InputDevice" Identifier "--device--" Driver "wacom" Option "CorePointer" "on" EndSection This would lead to the device being assigned a type and assumed to be for hotplugging. Later, when the device attributes are duplicated during QueueHotplug, asprintf() tries to duplicate attr->product, which is always NULL for xorg.conf devices. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Jason Gerecke <killertofu@gmail.com>
* wacom 0.17.99.1xf86-input-wacom-0.17.99.1Jason Gerecke2012-10-191-1/+1
| | | | Signed-off-by: Jason Gerecke <killertofu@gmail.com>
* Limit use of touch class to touch devices onlyJason Gerecke2012-10-191-4/+6
| | | | | | | Applying the touch class to all devices shouldn't really affect anything, but just to be sure we surround it in a IsTouch() check. Signed-off-by: Jason Gerecke <killertofu@gmail.com>
* Correct number of actions reported by sendWheelStripEvent to sendActionJason Gerecke2012-10-191-8/+14
| | | | | | | | | | | | | | Commit 477a261e has sendWheelStripEvent use the ARRAY_SIZE macro on a pointer. This will not return a proper value, causing the wrong array length to be provided to sendAction. This can lead to only the first few actions assigned to a wheel or strip actually being performed. This patch changes the signature of sendWheelStripEvent to accept an explicit length. https://sourceforge.net/tracker/?func=detail&aid=3577713&group_id=69596&atid=52$ Signed-off-by: Jason Gerecke <killertofu@gmail.com>
* Have getWheelButton deal with array indices instead of pointersJason Gerecke2012-10-192-32/+29
| | | | | | | | | This patch modifies the function signature of getWheelButton so that it accepts and returns array indices rather than pointers. This is in preparation of the next commit, which would be needlessly unreadable otherwise. Signed-off-by: Jason Gerecke <killertofu@gmail.com>
* Restore pad button functionalityJason Gerecke2012-10-191-1/+5
| | | | | | | | | | | | Commit b0083492 broke pad buttons by no longer setting the wcmBTNChannel. With this variable left uninitialized, pad button data would be stored in another channel (e.g. 0) without any other data like proximity set. This commit sets wcmBTNChannel to point to the channel used for storing pad data whenever a pad packet is detected. Signed-off-by: Jason Gerecke <killertofu@gmail.com> Acked-by: Peter Hutterer <peter.hutterer@who-t.net>
* Add support for Cintiq 24HD touchJason Gerecke2012-10-192-0/+3
| | | | | | | | | | | Adds support for the EMR and touch digitizers on the Cintiq 24HD touch. The digitizers are on separate USB devices, which can lead to the cursor jumping back and forth between the stylus and finger. Performing arbitration between the two (disabling finger while pen is in proximity) is expected to be handled by the kernel driver. Signed-off-by: Jason Gerecke <killertofu@gmail.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
* Add recently-referenced functions to fake-symbolsJason Gerecke2012-10-192-0/+37
| | | | | Signed-off-by: Jason Gerecke <killertofu@gmail.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>