aboutsummaryrefslogtreecommitdiff
path: root/src/evdev.h
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2010-12-21 10:53:06 +1000
committerPeter Hutterer <peter.hutterer@who-t.net>2010-12-22 09:18:52 +1000
commit9aea1c5fa09c25ad83bcf2fd4ee4bd853d889e5e (patch)
treefbf1bdccb6498aa65e78ff410e5e62ebe09aaa03 /src/evdev.h
parentRevert "Don't count BTN_TOUCH as tool. (#29428)" (diff)
downloadxf86-input-evdev-9aea1c5fa09c25ad83bcf2fd4ee4bd853d889e5e.tar.gz
xf86-input-evdev-9aea1c5fa09c25ad83bcf2fd4ee4bd853d889e5e.tar.bz2
xf86-input-evdev-9aea1c5fa09c25ad83bcf2fd4ee4bd853d889e5e.zip
Add use_proximity bit for BTN_TOOL handling.
Touchpads send garbage data between BTN_TOOL_FINGER and BTN_TOUCH. This leads to cursor movement towards invalid positions (bottom left corner, usually). Add a new flag "use_proximity" as a delimiter for BTN_TOUCH handling. If unset, the actual proximity bits are ignored, no proximity events are sent and BTN_TOUCH is used for the tool handling. Example event stream for synaptics: Event: time 1292893041.002731, -------------- Report Sync ------------ Event: time 1292893041.015807, type 1 (Key), code 330 (Touch), value 0 Event: time 1292893041.015812, type 3 (Absolute), code 0 (X), value 4283 Event: time 1292893041.015813, type 3 (Absolute), code 1 (Y), value 4860 Event: time 1292893041.015815, type 3 (Absolute), code 24 (Pressure), value 23 Event: time 1292893041.015817, type 3 (Absolute), code 28 (Tool Width), value 5 Event: time 1292893041.027537, -------------- Report Sync ------------ Event: time 1292893041.038854, type 3 (Absolute), code 0 (X), value 1 Event: time 1292893041.038857, type 3 (Absolute), code 1 (Y), value 5855 Event: time 1292893041.038859, type 3 (Absolute), code 24 (Pressure), value 1 Event: time 1292893041.038861, type 3 (Absolute), code 28 (Tool Width), value 5 Event: time 1292893041.038864, -------------- Report Sync ------------ Event: time 1292893041.062432, type 3 (Absolute), code 24 (Pressure), value 0 Event: time 1292893041.062435, type 3 (Absolute), code 28 (Tool Width), value 0 Event: time 1292893041.062437, type 1 (Key), code 325 (ToolFinger), value 0 Event: time 1292893041.062438, -------------- Report Sync ------------ Reported-by: Dave Airlie <airlied@redhat.com> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Chris Bagwell <chris@cnpbagwell.com>
Diffstat (limited to 'src/evdev.h')
-rw-r--r--src/evdev.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/evdev.h b/src/evdev.h
index b04f961..f640fdd 100644
--- a/src/evdev.h
+++ b/src/evdev.h
@@ -126,6 +126,7 @@ typedef struct {
int flags;
int in_proximity; /* device in proximity */
+ int use_proximity; /* using the proximity bit? */
int num_buttons; /* number of buttons */
BOOL swap_axes;
BOOL invert_x;