summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2014-02-19Log when the pen device appears to be too worn outfor_PeterEgbert Eich2-1/+42
Worn out pens have an initial pressure != 0. If this pressure persists while the pen is in proximity and still exists when going out of proximity, warn about worn out tool. Some devices seem to send a zero pressure when going out of proximity. Thus we record the last pressure when still in proximity. Also we count the number of events we have received while in proximity so the risk of false reports on 'quick taps' is lower. This condition may also occur intermittently on abusive operation. Signed-off-by: Egbert Eich <eich@suse.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2014-02-19Add more detailed messaging in code that handles abnormal situationsEgbert Eich1-0/+2
Log which serial numbers have been force-proxied out. Signed-off-by: Egbert Eich <eich@suse.com> Acked-by: Peter Hutterer <peter.hutterer@who-t.net>
2014-02-19Avoid 'division by zero' in xf86ScaleAxis()Egbert Eich1-4/+9
If minPressure == wcmMaxZ then the range left to scale is 0. Catch this condition and act appropriately. Signed-off-by: Egbert Eich <eich@suse.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Jason Gerecke <killertofu@gmail.com>
2014-02-19Remove test if pressure falls below the minPressureEgbert Eich1-8/+0
This code is entirely irrelevant as it is called immediately after rebasePressure() which already ensures that minPressure is the minimum of minPressure and current pressure unless one mistrusts the implementation of min(). Signed-off-by: Egbert Eich <eich@suse.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2014-02-19Get rid of spurious 'format not a string literal' warningsEgbert Eich1-61/+43
With '-Wformat-nonliteral' gcc kindly warns us that it cannot check the arguments of a scanf statement as the format string is not literal. This happens if the format string itself is pointer. Since the list of format strings only has two elements the same thing can be achieved in code directly. Signed-off-by: Egbert Eich <eich@suse.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Jason Gerecke <killertofu@gmail.com>
2014-02-19Fix spurious '-Wshadow' warningEgbert Eich1-1/+1
Signed-off-by: Egbert Eich <eich@suse.com> Reviewed-by: Jason Gerecke <killertofu@gmail.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2014-02-19Fix '-Wuninitialized' warningsEgbert Eich1-1/+3
Pinning variables to some value to fix warning about uninitialized variable. Signed-off-by: Egbert Eich <eich@suse.com> Reviewed-by: Jason Gerecke <killertofu@gmail.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2014-02-19Fix warning about discarding 'const' qualifierEgbert Eich2-2/+2
Signed-off-by: Egbert Eich <eich@suse.com> Reviewed-by: Jason Gerecke <killertofu@gmail.com>
2014-02-19Make tested static functions non-static for test suiteEgbert Eich6-15/+42
This gets rid of the hack which redefines 'static' to make every static function in the driver non-static for the test suite. Instead we use a macro instead of 'static' in the function definition of each function used in the test suite which we can set to empty when compiling the test suite. At the same time we create a declaration for each of those functions which gets us rind of about a bazillion compiler warnings. Signed-off-by: Egbert Eich <eich@suse.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2014-02-14Add missing symbol xf86PrintChipsets() for test suiteEgbert Eich1-0/+5
Signed-off-by: Egbert Eich <eich@suse.com> Reviewed-by: Jason Gerecke <killertofu@gmail.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2014-02-14Fix loads of 'redundand declaration' warnings in test suiteEgbert Eich2-198/+31
Most symbols in fake-symbols.h were already declared in the Xserver header files from the SDK which are also included. These produce loads of compiler warnings. The few remaining ones can be added by including xf86_OSproc.h and exevents.h. Then then all function declarations for the stub functions can be deleted. Relying on SDK provided headers makes providing stub functions cumbersome due to frequent non-atomic API/ABI changes. To work around this one would have to avoid SDK headers completely, though. Signed-off-by: Egbert Eich <eich@suse.com> Reviewed-by: Jason Gerecke <killertofu@gmail.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2014-02-14Fix type mismatch in test suiteEgbert Eich2-2/+2
Add CONST which expands to either 'const' or nothing depending on ABI version. This eliminates a compiler error. Signed-off-by: Egbert Eich <eich@suse.com> Reviewed-by: Jason Gerecke <killertofu@gmail.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2014-02-11Have Lenovo "ISD-V4" (0x6004) sensor use wacom driverJason Gerecke2-2/+2
https://bugs.freedesktop.org/show_bug.cgi?id=66891 Signed-off-by: Jason Gerecke <killertofu@gmail.com>
2014-02-11conf: add N-Trig DuoSense to our matched devicesPeter Hutterer2-2/+2
That device has a pen and an eraser tool, as well as a touch device. Handle it with the wacom driver by default, the evdev driver isn't quite up to scratch here. This also fixes a missing match in the .fdi file for the base N-Trig devices - just in case. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2013-11-04Check return value of EVIOCGPROP ioctlPeter Hutterer1-2/+3
Doesn't change anything functionally since prop is 0 anyway but this static analyzers shut up. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Ping Cheng <pingc@wacom.com>
2013-10-14Decide WCM_LCD by kernel propertyPing Cheng1-0/+9
kernel 2.6.38 introduced INPUT_PROP_DIRECT to indicate a device is a direct touch (onscreen pointer) device. Use it so we do not have to add individual devcies for that feature. When INPUT_PROP_DIRECT was added, INPUT_PROP_MAX and EVIOCGPROP were also defined. So, we only need to make sure INPUT_PROP_DIRECT is defined. Signed-off-by: Ping Cheng <pingc@wacom.com> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2013-10-14Fix missing pad/expresskey events issuePing Cheng1-14/+15
Setting PAD_ID should not be limited to just tablets that use generic BTN_* events. Also, on touch enabled devices, we miss pad events when touch events are filtered/disabled. Walk through all channels to make sure all channels that have changed values are processed. Reviewed-by: Jason Gerecke <killertofu@gmail.com> Acked-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Ping Cheng <pingc@wacom.com> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2013-10-14Threshold applies to pen tools onlyPing Cheng1-7/+5
This patch also removes redundant device name in X_PROBED messages. Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Ping Cheng <pingc@wacom.com> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2013-09-27wacom 0.23.0Jason Gerecke1-1/+1
Signed-off-by: Jason Gerecke <killertofu@gmail.com>
2013-09-19wacom 0.22.99.1Jason Gerecke1-1/+1
Signed-off-by: Jason Gerecke <killertofu@gmail.com>
2013-09-19Correct return value of special_map_buttonJason Gerecke1-2/+2
The 'special_map_*' functions called by 'parse_actions' are expected to return a count of the number of words of input they have consumed. The 'special_map_buttom' function errounously returns the number of actions added instead, causing the program to potentially skip over requested actions which follow a list of "button" actions. Signed-off-by: Jason Gerecke <killertofu@gmail.com>
2013-09-19Fix buffer overflows in 'special_map_*'Jason Gerecke1-16/+42
Each of the 'special_map_*' functions is given free reign to write to the end of a buffer, but is never given the size of the buffer itself. It is trivial to trigger an overflow simply by feeding the program more actions to perform than space to store them. This patch adds an argument to each function which contains the buffer's size. The functions check for sufficient space before writing to the buffer and will print out an error message if it isn't available. Signed-off-by: Jason Gerecke <killertofu@gmail.com>
2013-09-11Add support for Intuos Pro seriesPing Cheng2-0/+7
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Ping Cheng <pingc@wacom.com> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2013-09-05strdup the option key/values in our input_option_newPeter Hutterer1-2/+2
This is a interface for servers with ABI < 14 (up to server 1.11). The server version of it strdups the values, so we must do the same. Otherwise the values assigned to the InputOption list in wcmOptionDupConvert are freed during xf86OptionListFree(). That later causes a SIGABORT when NewInputDeviceRequest starts using those options. https://sourceforge.net/p/linuxwacom/bugs/233/ Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Acked-by: Ping Cheng <pinglinux@gmail.com>
2013-09-05Print list of supported models on wcmPlugPeter Hutterer3-148/+195
When the driver starts, print the list of supported models. This should help with any questions like "does my driver support this or that model". For those models that don't have a defined name, print "usb:1234:5678" instead, so users can at least try to match the usb IDs. Sample log output: [ 25950.166] (II) wacom: Driver for Wacom graphics tablets: PenPartner, PenPartner, Graphire, Graphire2 4x5, Graphire2 5x7, Graphire3 4x5, Graphire3 6x8, Graphire4 4x5, Graphire4 6x8, BambooFun 4x5, BambooFun 6x8, Bamboo1 Medium, Graphire4 6x8 BlueTooth, CTL-460, CTH-461, CTL-660, CTL-461/S, Bamboo Touch, CTH-460/K, CTH-461/S, CTH-661/S1, CTH-461/L, CTH-661/L, Intuos 4x5, Intuos 6x8, Intuos 9x12, Intuos 12x12, Intuos 12x18, PTU600, PL400, PL500, PL600, PL600SX, PL550, PL800, PL700, PL510, PL710, DTI520, DTF720, DTF720a, DTF521, DTU1931, DTU2231, DTU1631, Intuos2 4x5, Intuos2 6x8, Intuos2 9x12, Intuos2 12x12, Intuos2 12x18, Intuos2 6x8 , Volito, PenStation, Volito2 4x5, Volito2 2x3, PenPartner2, Bamboo, Bamboo1, Bamboo1 4x6, Bamboo1 5x8, Intuos3 4x5, Intuos3 6x8, Intuos3 9x12, Intuos3 12x12, Intuos3 12x19, Intuos3 6x11, Intuos3 4x6, Intuos4 4x6, Intuos4 6x9, Intuos4 8x13, Intuos4 12x19, Intuos4 WL USB Endpoint, Intuos4 WL Bluetooth Endpoint, Intuos5 touch S, Intuos5 touch M, Intuos5 touch L, Intuos5 S, Intuos5 M, Cintiq 21UX, Cintiq 20WSX, Cintiq 12WX, Cintiq 21UX2, Cintiq 24HD, Cintiq 22HD, Cintiq 24HD touch (EMR digitizer), Cintiq 13HD, DTK2241, DTH2242, Cintiq 22HDT, TabletPC 0x90, TabletPC 0x93, TabletPC 0x97, TabletPC 0x9A, CapPlus 0x9F, TabletPC 0xE2, TabletPC 0xE3, TabletPC 0xE5, TabletPC 0xE6, TabletPC 0xEC, TabletPC 0xED, TabletPC 0xEF, TabletPC 0x100, TabletPC 0x101, TabletPC 0x10D, TabletPC 0x4001, usb:172f:0024, usb:172f:0025, usb:172f:0026, usb:172f:0027, usb:172f:0028, usb:172f:0030, usb:172f:0031, usb:172f:0032, usb:172f:0033, usb:172f:0034, usb:172f:0035, usb:172f:0036, usb:172f:0037, usb:172f:0038, usb:172f:0039, usb:172f:0051, usb:172f:0052, usb:172f:0053, usb:172f:0054, usb:172f:0055, usb:172f:0056, usb:172f:0057, usb:172f:0058, usb:172f:0500, usb:172f:0501, usb:172f:0502, usb:172f:0503, usb:1b96:0001, usb:17ef:6004 [ 25950.167] (II) Using input driver 'wacom' for 'Wacom Intuos4 6x9' Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Acked-by: Ping Cheng <pinglinux@gmail.com>
2013-07-15wacom 0.22.1Jason Gerecke1-1/+1
Signed-off-by: Jason Gerecke <killertofu@gmail.com>
2013-07-15Fix build on ABI < 16 - touch_mask isn't definedPeter Hutterer1-0/+2
Fixes: http://sourceforge.net/p/linuxwacom/bugs/232 Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2013-07-10wacom 0.22.0Jason Gerecke1-1/+1
Signed-off-by: Jason Gerecke <killertofu@gmail.com>
2013-07-10Unify wcmFingerMultitouch and wcmSendTouchEventPing Cheng1-45/+26
Signed-off-by: Ping Cheng <pingc@wacom.com> Acked-by: Jason Gerecke <killertofu@gmail.com>
2013-07-10Transform touch events just like all other eventsSjoerd Simons1-0/+2
Transform touch coordinates in the same way as other events coming from the wacom driver otherwise setting for exmaple the Wacom Rotation property has no effect Signed-off-by: Sjoerd Simons <sjoerd@greynoise.nl> Acked-by: Jason Gerecke <killertofu@gmail.com>
2013-07-10Revert "Transform touch events just like all other events"Jason Gerecke1-26/+43
This reverts commit bfb56bf858e08d95156d52cec9744d3d3251b59c. This commit will be split in two to provide proper credit for each of the two authors. Signed-off-by: Jason Gerecke <killertofu@gmail.com>
2013-07-03Add support for 0xEC.Ping Cheng2-0/+2
It is a Wacom device found in Samsung Ativ Smart PC Pro 700t. Signed-off-by: Ping Cheng <pingc@wacom.com> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2013-07-03Revert "Add support for 0xED."Peter Hutterer2-2/+0
Typo in commit message, tablet is actually 0xEC. Revert and re-commit to make the patch easier to find. This reverts commit 8488c2af5bdd6dc4d049dc6d895c50c5f34aea14.
2013-07-02Add support for 0xED.Ping Cheng2-0/+2
It is a Wacom device found in Samsung Ativ Smart PC Pro 700t. Signed-off-by: Ping Cheng <pingc@wacom.com>
2013-06-14wacom 0.21.99.1Ping Cheng1-1/+1
Signed-off-by: Ping Cheng <pingc@wacom.com>
2013-06-14Add xf86OptionListFree for distcheckPing Cheng2-4/+8
Signed-off-by: Ping Cheng <pingc@wacom.com>
2013-06-07Transform touch events just like all other eventsPing Cheng1-43/+26
Transform touch coordinates in the same way as other events coming from the wacom driver otherwise setting for exmaple the Wacom Rotation property has no effect Signed-off-by: Sjoerd Simons <sjoerd@greynoise.nl> Acked-by: Jason Gerecke <killertofu@gmail.com> Signed-off-by: Ping Cheng <pingc@wacom.com>
2013-06-06Don't emulate a mouse when multitouch is enabledPing Cheng2-45/+24
Currently when enabling XI 1.2 multitouch events the Wacom driver does a strange mix of emulating a mouse (when there is only touch) and switches suddenly switches to be a touchscreen when 2 fingers are down. Change this to only send touch events when using multitouch mode, such that the touchscreen works the same as other touchscreens. This enables applications to properly respond to one finger touches (e.g. panning in GTK+). The X server core will still send emulated input events to applications not supporting multitouch, so there shouldn't be a regression for those applications. Signed-off-by: Sjoerd Simons <sjoerd@greynoise.nl> Acked-by: Jason Gerecke <killertofu@gmail.com> Signed-off-by: Ping Cheng <pingc@wacom.com>
2013-05-23Add support for Cintiq 22HDT and 13HD, DTK2241 and DTH2242.Ping Cheng2-1/+11
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>
2013-05-09Don't init abswheel2 valuator (7th val) if we don't have onePeter Hutterer1-10/+11
InitValuatorAxisStruct() will return if the axisnum > num_axes and not initialise anything which is why the current code worked without issues. With a new patch to the server this will now complain with an error message to the log. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Ping Cheng <pinglinux@gmail.com>
2013-05-09Free the device name after reassigningPeter Hutterer1-2/+5
When hotplugging the first tool (usually the stylus) changes pInfo->name to the name + tool name. Thus, free the original one. And strdup the oldname so we can unconditially free it, regardless of whether we changed the actual device name or not. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Ping Cheng <pinglinux@gmail.com>
2013-05-09Free the touch mask on shutdownPeter Hutterer1-0/+1
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Ping Cheng <pinglinux@gmail.com>
2013-05-09Free input attribute's productPeter Hutterer1-3/+5
This is copied first by DuplicateInputAttributes, then asprintf makes another copy. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Ping Cheng <pinglinux@gmail.com>
2013-05-09Free duplicated option list after conversion to InputOptionPeter Hutterer1-5/+7
The duplicated list is a copy (as the comment in the server says) and thus must be freed. ==27895== 947 (40 direct, 907 indirect) bytes in 1 blocks are definitely lost in loss record 266 of 311 ==27895== at 0x4A06B6F: calloc (vg_replace_malloc.c:593) ==27895== by 0x4E538C: addNewOption2 (Flags.c:203) ==27895== by 0x4E5401: xf86addNewOption (Flags.c:216) ==27895== by 0x4AEB24: xf86AddNewOption (xf86Option.c:347) ==27895== by 0x4AE54B: xf86OptionListDuplicate (xf86Option.c:152) ==27895== by 0xB74D139: wcmOptionDupConvert (wcmValidateDevice.c:382) ==27895== by 0xB74D408: wcmQueueHotplug (wcmValidateDevice.c:515) ==27895== by 0xB74D645: wcmHotplugOthers (wcmValidateDevice.c:568) ==27895== by 0xB742DA2: wcmPreInit (wcmConfig.c:599) ==27895== by 0x4C1ACF: xf86NewInputDevice (xf86Xinput.c:846) ==27895== by 0x4C2014: NewInputDeviceRequest (xf86Xinput.c:989) ==27895== by 0x4DD72C: device_added (udev.c:231) Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Ping Cheng <pinglinux@gmail.com>
2013-05-09Plug memory leaks left by xf86SetStrOptionPeter Hutterer6-20/+44
xf86SetStrOption() returns a strdup'd string that needs to be freed after use. This requires some const char* → char* changes too, for things that were never really const char* to begin with anyway. wcmEventAutoDevProbe() can use xf86CheckStrOption so it too returns a strup that we can free lateron. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Ping Cheng <pinglinux@gmail.com>
2013-05-02Purge TILT_REQUEST_FLAGPeter Hutterer2-5/+0
Write-only value, obsolete as of xf86-input-wacom-0.10.4-45-gba90433 Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Acked-by: Ping Cheng <pinglinux@gmail.com>
2013-05-02man: clarify how to configure keys on higher shift levels in xsetwacomPeter Hutterer1-0/+8
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Ping Cheng <pinglinux@gmail.com>
2013-05-02xsetwacom: map a bunch of special symbolsPeter Hutterer1-3/+58
Punctuation marks and others map to XK_* keysyms but only in their named form, not in their single-character symbol form. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Ping Cheng <pinglinux@gmail.com>
2013-05-02xsetwacom: if we fail to map a string, try as special key or warnPeter Hutterer1-0/+8
If a string comes back with a KeySym of 0, try again as a special key. And if that fails too, print a warning. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Ping Cheng <pinglinux@gmail.com>
2013-05-02xsetwacom: add special mappings for Home, End, DeletePeter Hutterer1-0/+3
These three are likely written as home, end, del, so let's try to understand that. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Ping Cheng <pinglinux@gmail.com>