]> err.no Git - systemd/commitdiff
input-id: identify touchscreens
authorDmitry Torokhov <dmitry.torokhov@gmail.com>
Thu, 3 Dec 2009 12:20:10 +0000 (13:20 +0100)
committerMartin Pitt <martin.pitt@ubuntu.com>
Thu, 3 Dec 2009 12:20:10 +0000 (13:20 +0100)
Add detection of touchscreens to the input-id utility.

Signed-off-by: Martin Pitt <martin.pitt@ubuntu.com>
extras/input_id/input_id.c

index 95f78795c06eb75bd5d6afdc02970463e4e7c466..21ee6b3cd3e38a345aab6029fe0f0b30c6c4586e 100644 (file)
@@ -89,6 +89,8 @@ static void test_pointers (const unsigned long* bitmask_ev,
                        /* This path is taken by VMware's USB mouse, which has
                         * absolute axes, but no touch/pressure button. */
                        is_mouse = 1;
+               else if (test_bit (BTN_TOUCH, bitmask_key))
+                       puts("ID_INPUT_TOUCHSCREEN=1");
        }
 
        if (test_bit (EV_REL, bitmask_ev) &&