Input: wacom - disable Bamboo touchpad when pen is being used
authorChris Bagwell <chris@cnpbagwell.com>
Sun, 12 Sep 2010 07:12:28 +0000 (00:12 -0700)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Sun, 12 Sep 2010 07:13:38 +0000 (00:13 -0700)
Signed-off-by: Chris Bagwell <chris@cnpbagwell.com>
Acked-by: Ping Cheng <pingc@wacom.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
drivers/input/tablet/wacom_wac.c

index 536156baedfe24452bdd4010bdd55215f633e4f0..e1b65ba844386c94b9a37336886fa3cc4a1158d8 100644 (file)
@@ -866,7 +866,13 @@ static int wacom_bpt_touch(struct wacom_wac *wacom)
        for (i = 0; i < 2; i++) {
                int p = data[9 * i + 2];
                input_mt_slot(input, i);
-               if (p) {
+               /*
+                * Touch events need to be disabled while stylus is
+                * in proximity because user's hand is resting on touchpad
+                * and sending unwanted events.  User expects tablet buttons
+                * to continue working though.
+                */
+               if (p && !wacom->shared->stylus_in_proximity) {
                        int x = get_unaligned_be16(&data[9 * i + 3]) & 0x7ff;
                        int y = get_unaligned_be16(&data[9 * i + 5]) & 0x7ff;
                        if (features->quirks & WACOM_QUIRK_BBTOUCH_LOWRES) {