]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commitdiff
HID: wacom: Report ABS_MISC event for Cintiq Companion Hybrid
authorJason Gerecke <killertofu@gmail.com>
Thu, 22 Jan 2015 23:53:28 +0000 (15:53 -0800)
committerJiri Kosina <jkosina@suse.cz>
Fri, 23 Jan 2015 14:06:24 +0000 (15:06 +0100)
It appears that the Cintiq Companion Hybrid does not send an ABS_MISC event to
userspace when any of its ExpressKeys are pressed. This is not strictly
necessary now that the pad exists on its own device, but should be fixed for
consistency's sake.

Traditionally both the stylus and pad shared the same device node, and
xf86-input-wacom would use ABS_MISC for disambiguation. Not sending this causes
the Hybrid to behave incorrectly with xf86-input-wacom beginning with its
8f44f3 commit.

Signed-off-by: Jason Gerecke <killertofu@gmail.com>
Reviewed-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
drivers/hid/wacom_wac.c

index a4ba8caa2456c962d949fc136d5c051a8fde47e8..f8861494f4e3901f025e99a3b6808317c9bbb8f7 100644 (file)
@@ -783,6 +783,12 @@ static int wacom_intuos_irq(struct wacom_wac *wacom)
                        input_report_key(input, BTN_7, (data[4] & 0x40));  /* Left   */
                        input_report_key(input, BTN_8, (data[4] & 0x80));  /* Down   */
                        input_report_key(input, BTN_0, (data[3] & 0x01));  /* Center */
+
+                       if (data[4] | (data[3] & 0x01)) {
+                               input_report_abs(input, ABS_MISC, PAD_DEVICE_ID);
+                       } else {
+                               input_report_abs(input, ABS_MISC, 0);
+                       }
                } else if (features->type >= INTUOS5S && features->type <= INTUOSPL) {
                        int i;