diff mbox

[v3] input: mt: Move tracking and pointer emulation to input-mt

Message ID 4CFE934D.4040309@euromail.se (mailing list archive)
State New, archived
Headers show

Commit Message

Henrik Rydberg Dec. 7, 2010, 8:04 p.m. UTC
None
diff mbox

Patch

diff --git a/drivers/input/tablet/wacom_wac.c b/drivers/input/tablet/wacom_wac.c
index 4e59b93..0104e1a 100644
--- a/drivers/input/tablet/wacom_wac.c
+++ b/drivers/input/tablet/wacom_wac.c
@@ -866,17 +866,18 @@  static int wacom_bpt_touch(struct wacom_wac *wacom)
        int i;

        for (i = 0; i < 2; i++) {
-               int p = data[9 * i + 2] && !wacom->shared->stylus_in_proximity;
+               int p = data[9 * i + 2];
+               bool touch = p && !wacom->shared->stylus_in_proximity;

                input_mt_slot(input, i);
-               input_mt_report_slot_state(input, MT_TOOL_FINGER, p);
+               input_mt_report_slot_state(input, MT_TOOL_FINGER, touch);
                /*
                 * 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) {
+               if (touch) {
                        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) {