From: Egbert Eich <e...@suse.com> Currently the detection of the tool type is somewhat messy: It is done is in two places: early in usbDispatchEvents() by calling usbInitToolType() and later on in the same function when the events are parsed. usbInitToolType() is used to set (wcmUSBData*)->wcmDeviceType, the detection that happens later when the events are parsed sets (WacomDeviceState).device_type. These variables are matched against each to find the right channel for a device. If the algorithms used for both set of tool type detection diverge undesirable effects may happen: it may be impossible to find the correct channel for a device. Therefore it is advisable to determine the tool type only once - ie. in usbInitToolType() - and copy the result to (WacomDeviceState).device_type if this value is unset.
Egbert Eich (6): Remove unused code Fix initial device type detection Add missing key codes to toolTypeToDeviceType() Add missing BTN_TOUCH key code to toolTypeToDeviceType() Remove duplicate tool type detection Attempt to derive the tool type from a kown button/key event src/wcmUSB.c | 117 ++++++++++++++++++++++++++++++++--------------------------- 1 file changed, 64 insertions(+), 53 deletions(-) -- 1.8.4.5 ------------------------------------------------------------------------------ Subversion Kills Productivity. Get off Subversion & Make the Move to Perforce. With Perforce, you get hassle-free workflows. Merge that actually works. Faster operations. Version large binaries. Built-in WAN optimization and the freedom to use Git, Perforce or both. Make the move to Perforce. http://pubads.g.doubleclick.net/gampad/clk?id=122218951&iu=/4140/ostg.clktrk _______________________________________________ Linuxwacom-devel mailing list Linuxwacom-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linuxwacom-devel