summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
* Drop AM_MAINTAINER_MODEPeter Hutterer2012-10-172-2/+1
| | | | | | | | | We want xf86-input-wacom to react to changes in Makefile.am's Long writeup: http://blogs.gnome.org/desrt/2011/09/08/am_maintainer_mode-is-not-cool/ Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
* Fix prerequisite check in wcmUpdateSerialJason Gerecke2012-10-082-3/+2
| | | | | | | | | | | | | | The prerequisite check in wcmUpdateSerial is incorrect. If the tool ID changes, the property reflecting it will not be updated unless/until the serial number also changes. The check is updated to reflect this. Additionally, the prerequesite check at one of its callsites is removed since the function performs the same check internally. https://bugs.freedesktop.org/show_bug.cgi?id=45237 Signed-off-by: Jason Gerecke <killertofu@gmail.com> Reviewed-by: Ping Cheng <pingc@wacom.com>
* Move check for enabled gestures to the functions that execute themJason Gerecke2012-10-082-9/+14
| | | | | | | | | | | | | At the moment, disabling gestures disables *all* gestures. That includes the core "tap to click" gesture (and slightly-less-core "tap and hold to drag"). This patch allows these two gestures to not be considered such by moving wcmGesture check into the functions that execute the gesture. All two-finger functions (right click, scroll, and zoom) are disabled by wcmGesture, but all single-finger functions remain operational. Signed-off-by: Jason Gerecke <killertofu@gmail.com> Acked-by: Chris Bagwell <chris@cnpbagwell.com> Tested-by: Chris Bagwell <chris@cnpbagwell.com>
* Use new multitouch protocol in XI2 if possibleJason Gerecke2012-10-084-4/+109
| | | | | | | | | | | | | | | | | Adds a new MULTITOUCH gesture mode that will redirect all in-contact touches through the new multitouch code available in XI2.2 (ABI >= 16). MULTITOUCH mode will only be entered when in-driver gestures have been disabled and at least two fingers are present. The driver will remain in this mode until *all* fingers have left the tablet. For the moment, all touches are sent as XIDependentTouch. Direct touch devices such as tablet PCs and Cintiqs are not an exception. This may be changed in the future once frameworks are better equipped to handle direct input touches. Signed-off-by: Jason Gerecke <killertofu@gmail.com> Tested-by: Chris Bagwell <chris@cnpbagwell.com>
* Dynamically choose channel for ABS_MT dataJason Gerecke2012-10-081-3/+6
| | | | | | | | | | | Now that the touch code doesn't look in statically-defined channels and usbChooseChannel is capable of locating channel numbers for arbitrary tool type/serial combinations, we can use the latter to track an aribrary number of touches without fear of stepping on the toes of another channel. Signed-off-by: Jason Gerecke <killertofu@gmail.com> Tested-by: Chris Bagwell <chris@cnpbagwell.com>
* Have usbChooseChannel take explicit device type and serial argsJason Gerecke2012-10-081-10/+8
| | | | | | | | | Instead of divining this information from the stored private data, take them as arguments. This gives us more flexibility in finding channels for sub-tools (e.g. individual fingers). Signed-off-by: Jason Gerecke <killertofu@gmail.com> Tested-by: Chris Bagwell <chris@cnpbagwell.com>
* Simplify usbChooseChannel logicJason Gerecke2012-10-081-103/+75
| | | | | | | | | Instead of having different per-protocol cases, just obtain serial numbers equivelent to those you'd get from Protocol 5 and then use that serial to find a channel dynamically. Signed-off-by: Jason Gerecke <killertofu@gmail.com> Tested-by: Chris Bagwell <chris@cnpbagwell.com>
* Make usbInitToolType more generic, and always useJason Gerecke2012-10-081-35/+87
| | | | | | | | | | | Tweaks the usbInitToolType function to be always useful. This is needed so that we can use it to get the tool type for all event frames, allowing us to properly fill in the tool type for devices that we otherwise don't figure out until later on (which causes problems with the proper operation of usbChooseChannel). Signed-off-by: Jason Gerecke <killertofu@gmail.com> Tested-by: Chris Bagwell <chris@cnpbagwell.com>
* Dynamically find touch channels, instead of hard-codingJason Gerecke2012-10-081-37/+76
| | | | | | | | | | | Right now the driver assumes that the first touch will always be in channel 0, and the second touch (if present) is in channel 1. This patch adds a new function to scan the channel list for appropriate contacts, and uses it instead of the hard-coded index accesses. Signed-off-by: Jason Gerecke <killertofu@gmail.com> Tested-by: Chris Bagwell <chris@cnpbagwell.com>
* Use serial number instead of channel number to identify contactsJason Gerecke2012-10-084-8/+13
| | | | | | | | | | Code that deals with touch points shouldn't care which channel an event is occuring in; it should be more concerned with the finger that caused it. At the moment these are the same things (first finger is always in channel zero), but this will soon change. Signed-off-by: Jason Gerecke <killertofu@gmail.com> Tested-by: Chris Bagwell <chris@cnpbagwell.com>
* Add and use a 'dirty' bit for WacomChannelJason Gerecke2012-10-082-51/+39
| | | | | | | | | Instead of keeping around 'channel_changed', 'mt_channel_changed', and 'btn_channel_changed', just add a flag to the WacomChannel itself that can be set whenever something changes. Signed-off-by: Jason Gerecke <killertofu@gmail.com> Tested-by: Chris Bagwell <chris@cnpbagwell.com>
* Properly handle nulls in wcmIsHotpluggedDeviceJason Gerecke2012-10-031-2/+2
| | | | | | | | | | Commit def7b5fd changed how wcmIsHotpluggedDevice handles null values, with the result that a device with no "_source" specified would be interpreted as having been hotplugged. This restores the original behavior. Signed-off-by: Jason Gerecke <killertofu@gmail.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
* Properly handle nulls in wcmCheckSourceJason Gerecke2012-10-031-4/+3
| | | | | | | | | Commit cff344b1 modified the null-handling of wcmCheckSource, such that the wrong result will be returned if either/both fsource and psource are null. This patch restores the original behavior. Signed-off-by: Jason Gerecke <killertofu@gmail.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
* Fix double-free in wcmPreInitParseOptionsJason Gerecke2012-10-031-1/+0
| | | | | | | | | | | | | | | | | The 'tool' function here is set equal to 'priv->tool' earlier in this function. If an error condition occurs, the tool can be freed both here and in wcmFree (via wcmUninit). It should be safe to postpone this free() until wcmFree to be freed along with the rest of the memory allocated in wcmAllocate. There should be no leak (wcmUninit will be called on failure) and any code relying on priv->tool being a valid pointer after the failure of wcmPreInitParseOptions is already broken. https://bugs.freedesktop.org/show_bug.cgi?id=55200 Signed-off-by: Jason Gerecke <killertofu@gmail.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
* Device grab should be optionalJason Gerecke2012-09-192-8/+15
| | | | | | | | | | | | | Like in recent versions of xf86-input-evdev, grabbing the input device with EVIOCGRAB should be optional. This would enable for example indicator applets, and would improve dynamic handling of different input devices. Proposed patch extended to document new GrabDevice driver option. https://sourceforge.net/tracker/?func=detail&aid=3509828&group_id=69596&atid=525124 Reported-by: henris42
* Ignore out-of-prox events from unknown devices already out-of-proxJason Gerecke2012-09-191-0/+5
| | | | | | | | | | | | | | | | Fixes an issue with the Intuos5, which sends extra out-of-prox notifications when the ExpressKeys are touched. This causes the driver to ask the kernel for the tool currently in prox and post an empty event for it. The result is a cursor that (only while the pen is in prox) sometimes jumps to the top left when touching the buttons. We fix this by ignoring events that claim to be leaving prox when the tool is already supposedly out of prox. https://bugs.freedesktop.org/show_bug.cgi?id=54250 Reported-by: Timo Aaltonen <tjaalton@ubuntu.com> Signed-off-by: Jason Gerecke <killertofu@gmail.com>
* Have keysym_to_keycode handle unused keycodesJason Gerecke2012-09-191-3/+2
| | | | | | | | | | | | | | | | | | | | | | The current implementation of keysym_to_keycode does not properly handle unused keycodes. The functions XkbKeySymsPtr and XkbKeyGroupWidth mislead it into believing it is reading a keysym associated with the unused keycode when in reality it is reading a keysym associated with the *next used* keycode. This impacts different keys depending on the keyboard layout in use. On mine for instance, the left Super key is unusable because its keycode is preceeded by an unused keycode. To resolve this issue, we take a page from XKeysymToKeycode and use the function XKeycodeToKeysym instead of manually accessing the keysyms. https://sourceforge.net/tracker/?func=detail&aid=3555424&group_id=69596&atid=525124 Reported-by: alexmaret Signed-off-by: Jason Gerecke <killertofu@gmail.com>
* Add LogMessageVerbSigSafe to fake-symbolsJason Gerecke2012-09-072-0/+6
| | | | | | | | Somehow overlooked this while adding 'xf86MsgVerb' to fake-symbols. Oops. Reported-by: Timo Aaltonen <tjaalton@ubuntu.com> Signed-off-by: Jason Gerecke <killertofu@gmail.com>
* Use kernel-reported tilt range and resolutionNikolai Kondrashov2012-09-056-20/+124
| | | | | | | | | | | | | | | | | | | | Use tilt range and, optionally, resolution reported by the kernel for event devices. Add a constant for resolution currently expected by applications: TILT_RES, 1 point per degree in kernel units (points/radian). Scale values to this resolution for compatibility and specify it for corresponding valuators (instead of 1) for future use by applications. Add constants for currently reported value limits: TILT_MIN and TILT_MAX, -64 and 63 respectively. Continue clamping values to [TILT_MIN, TILT_MAX] for compatibility. Values and ranges reported by currently supported tablets should remain unchanged. Signed-off-by: Nikolai Kondrashov <spbnick@gmail.com> Reviewed-by: Jason Gerecke <killertofu@gmail.com>
* wacom 0.17.0xf86-input-wacom-0.17.0Jason Gerecke2012-09-051-1/+1
| | | | Signed-off-by: Jason Gerecke <killertofu@gmail.com>
* wacom 0.16.99.1xf86-input-wacom-0.16.99.1Jason Gerecke2012-08-271-1/+1
| | | | Signed-off-by: Jason Gerecke <killertofu@gmail.com>
* Add xf86MsgVerb to fake-symbols to let 'make distcheck' completeJason Gerecke2012-08-272-1/+7
| | | | | | | | The switch from 'xf86Msg' to 'xf86MsgVerb' introduced in commit e4c1af41 requires that we define the latter in our fake-symbols so that the test suite can compile correctly. Signed-off-by: Jason Gerecke <killertofu@gmail.com>
* Make test_get_wheel_button happyJason Gerecke2012-08-272-11/+13
| | | | | | | | | | | | Apparently there is some subtle difference here between returning a pointer and using a double-pointer as an output parameter. Tracing through the function shows the former *should* be working, but for an unknown reason fails "assert(action == &action_dn)"... This patch shouldn't change any functionality -- it just shuts up `make distcheck`. Signed-off-by: Jason Gerecke <killertofu@gmail.com>
* Update test to match new function signatureJason Gerecke2012-08-271-8/+2
| | | | | | | The getWheelButton function's signature was changed in commit 40ecdcb5 but the tests were not updated to reflect this. Signed-off-by: Jason Gerecke <killertofu@gmail.com>
* Pre-allocate the tap timerPeter Hutterer2012-08-273-1/+4
| | | | | | | | wcmSingleFingerTap() is called during SIGIO, calling TimerSet(NULL, ...) will malloc inside the signal handler and hang the box. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Acked-by: Chris Bagwell <chris@cnpbagwell.com>
* Log debug messages in signal-safe mannerPeter Hutterer2012-08-231-2/+2
| | | | | | | | This is a rather broad brush, logging all messages in DBG() through the signal-safe interface instead of just the ones that really need it. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Acked-by: Ping Cheng <pinglinux@gmail.com>
* Use signal-safe logging patches where necessaryPeter Hutterer2012-08-236-25/+37
| | | | | Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Acked-by: Ping Cheng <pinglinux@gmail.com>
* Set WCM_LCD on the Cintiq 24HDJason Gerecke2012-08-221-1/+1
| | | | | | | This flag was apparently forgotten when the 24HD was originally added. Signed-off-by: Jason Gerecke <killertofu@gmail.com>
* Add missing newline to error messageJason Gerecke2012-08-021-1/+1
| | | | Signed-off-by: Jason Gerecke <killertofu@gmail.com>
* Internally use physical button numbering for actionsJason Gerecke2012-08-022-23/+43
| | | | | | | | | | One should not have to keep in mind the historic quirk that mouse buttons 4-7 have when dealing with buttons events generated by the tablet. This patch isolates conversion between physical and X11 numbering to the single place it has historically mattered: the button property getters/setters. Signed-off-by: Jason Gerecke <killertofu@gmail.com>
* Remove raw button fallback codepaths from wcmCommonJason Gerecke2012-08-021-50/+22
| | | | | | | | With actions now defined on initialization and reset to default when given a 'None' action, we can remove the raw button codepaths without a noticible change in driver behavior. Signed-off-by: Jason Gerecke <killertofu@gmail.com>
* Reset-on-None for Actions propertyJason Gerecke2012-08-022-14/+54
| | | | | | | | | | | This patch adds the ability to reset an individual Action by setting the corresponding element of an Actions property to the 'None' atom (i.e. 0). When encountered, the None will be replaced with an atom representing the default Action. This will let the driver behave as it currently does once raw button support is removed. Signed-off-by: Jason Gerecke <killertofu@gmail.com>
* Initialize action properties from defaultsJason Gerecke2012-08-021-2/+59
| | | | | | | | This patch adds functions capable of resetting the action properties (button/stip/wheel) to their default, and calls them on initialization. Signed-off-by: Jason Gerecke <killertofu@gmail.com>
* Cleanup call chain for action propertiesJason Gerecke2012-08-021-174/+107
| | | | | | | | | | This patch rewrites the call chains used for setting the three action properties by introducing a single function to handle the 'Actions' properties, and a single function for 'Action' properties. Functions which were merely helper functions have been inlined if appropriate. Signed-off-by: Jason Gerecke <killertofu@gmail.com>
* Remove support for 8-bit (raw button) strip/ring propertiesJason Gerecke2012-08-021-51/+1
| | | | | | | | | | | | | | | | This patch removes the ability to set up the touchstrips or touchrings with raw 8-bit button numbers. Buttons have been without this ability for quite some time, and this brings these two properties in line. This patch will break applications which rely on the use of raw buttons in the properties, but the actual fallout is expected to be minimal. Applications which don't understand Actions are already broken (since they can't work with buttons) and those that do understand Actions but don't use them can be easily modified. Signed-off-by: Jason Gerecke <killertofu@gmail.com>
* Replace multiple default variables with arraysJason Gerecke2012-08-025-64/+65
| | | | | | | | | | Storing the defaults for strips and wheels in individual variables makes updating and scanning through them very tedious. This patch replaces the variables with arrays and introduces new #define statements to keep the level of semantic meaning we had. Signed-off-by: Jason Gerecke <killertofu@gmail.com>
* Directly index into the various *keys arraysJason Gerecke2012-08-023-22/+14
| | | | | | | | | | | | | | | | | | The 'keys' array is indexed into by reference to the X11 button number stored in the 'buttons' array. While this may have been useful at some point in time, the benefits have since gone and left behind nothing but headaches. Note that because the association with X11 buttons has been removed, action mapping (via xsetwacom) no longer depends on on the raw mapping (via xorg.conf). For instance, on a system which has 'Option "Button3" "1"' set, use of the command 'xsetwacom set <id> button 1 10' will no longer cause *both* button 1 and button 3 to emit button 10. Its unlikely anyone relies on this quirk, but can be easily worked around if necessary. Signed-off-by: Jason Gerecke <killertofu@gmail.com>
* Merge branch 'release-script-fixes'Peter Hutterer2012-07-131-13/+31
|\
| * release.sh: support other modules (i.e. libwacom and input-wacom)Peter Hutterer2012-07-101-2/+22
| | | | | | | | | | | | | | | | Add a --module switch to the release script so we can use the same script for all three linuxwacom projects. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Chris Bagwell <chris@cnpbagwell.com>
| * release.sh: complain if tags are missingPeter Hutterer2012-07-101-2/+7
| | | | | | | | | | | | | | | | Previously we only checked the previous tag, not the current one. Move the check up a bit, make it more explicit. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Chris Bagwell <chris@cnpbagwell.com>
| * release.sh: remove gz tarball handlingPeter Hutterer2012-07-101-9/+2
| | | | | | | | | | Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Chris Bagwell <chris@cnpbagwell.com>
* | Add Cintiq 22HDPing Cheng2012-07-132-0/+2
|/ | | | | Signed-off-by: Ping Cheng <pinglinux@gmail.com> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
* Stop generating .gz filesPeter Hutterer2012-07-101-1/+1
| | | | | | | One tarball is enough and bz2 is common enough that we don't need both. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Acked-by: Jason Gerecke <killertofu@gmail.com>
* Don't init the rotation property on the padPeter Hutterer2012-07-101-1/+3
| | | | | | | Rotation doesn't do a lot on a device without usable axes Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Acked-by: Chris Bagwell <chris@cnpbagwell.com>
* wacom 0.16.0xf86-input-wacom-0.16.0Jason Gerecke2012-07-091-1/+1
| | | | Signed-off-by: Jason Gerecke <killertofu@gmail.com>
* wacom 0.15.99.1xf86-input-wacom-0.15.99.1Jason Gerecke2012-06-271-1/+1
| | | | Signed-off-by: Jason Gerecke <killertofu@gmail.com>
* Cleanup wcmInitAxesJason Gerecke2012-06-271-26/+46
| | | | | | No functional change. Signed-off-by: Jason Gerecke <killertofu@gmail.com>
* Provide consistent 'filler' axes to XJason Gerecke2012-06-271-46/+36
| | | | | | | | | Axes which aren't used by specific devices 'leak' some of the settings of the prior axis while creating the necessary 'filler' axis. This patch resets the variables to their proper defaults for each valuator's initialization. Signed-off-by: Jason Gerecke <killertofu@gmail.com>
* Create a wrapper for InitValuatorAxisStructJason Gerecke2012-06-271-67/+23
| | | | | | | | | | wcmInitAxes calls InitValuatorAxisStruct seven times, with each call requring two ifdefs each. To keep this function readable, this patch adds a wrapper function that centralizes all that ifdef uglyness into a single spot. Signed-off-by: Jason Gerecke <killertofu@gmail.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
* Find mouse buttons on pad devices if no generic buttons foundJason Gerecke2012-06-271-5/+6
| | | | | | | | | | | | | | | | | | | | | Devices like the Graphire4 and Bamboo-series have Pad buttons which emit "mouse button" events (e.g. BTN_FORWARD) instead of the usual "generic button" events (e.g. BTN_0). Currently, the code considers the former to be valid for the Pad device only if the tablet doesn't also support a Cursor device. Devices with mouse buttons on the Pad *and* have a Cursor device (like the Graphire4 and very early Bamboos) end up declaring zero Pad buttons because of this, causing us to allocate an insufficient number of actions and thereby prevent the re-mapping of their forward and back buttons. This patch changes the condition from "no Cursor device exists" to "no generic buttons exist". In theory this can result in the Pad claiming it has buttons when none physically exist, but it shouldn't result in any problems. Signed-off-by: Jason Gerecke <killertofu@gmail.com> Acked-by: Peter Hutterer <peter.hutterer@who-t.net>