aboutsummaryrefslogtreecommitdiff
path: root/src/evdev.h
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2010-10-11 09:33:28 +1000
committerPeter Hutterer <peter.hutterer@who-t.net>2010-10-18 09:54:42 +1000
commitb48f4c41c0d3386bba3e9d8fa3da91f18aae190b (patch)
tree746564bef5d8f63bd4d5f7fd0e06721ee5c6d6cd /src/evdev.h
parentRename evdev->tool to evdev->proximity. (diff)
downloadxf86-input-evdev-b48f4c41c0d3386bba3e9d8fa3da91f18aae190b.tar.gz
xf86-input-evdev-b48f4c41c0d3386bba3e9d8fa3da91f18aae190b.tar.bz2
xf86-input-evdev-b48f4c41c0d3386bba3e9d8fa3da91f18aae190b.zip
Add proximity support.
When one of the tools comes into proximity, queue up a proximity event and send it accordingly. Includes special handling for tablets that do not send axes with tools (#29645) Some tablets send axis values, then EV_SYN, and in the next event the BTN_TOOL_PEN/BTN_TOUCH, etc. For these tablets, the cursor doesn't move as coordinates while not in proximity are ignored. Buffer coordinates received while out-of-proximity and if we get a proximity event without other coordinates, re-use the last ones received. X.Org Bug 29645 <http://bugs.freedesktop.org/show_bug.cgi?id=29645> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Chris Bagwell <chris@cnpbagwell.com> Reviewed-by: Benjamin Tissoires <tissoire@cena.fr>
Diffstat (limited to 'src/evdev.h')
-rw-r--r--src/evdev.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/evdev.h b/src/evdev.h
index b382670..af93d41 100644
--- a/src/evdev.h
+++ b/src/evdev.h
@@ -109,6 +109,7 @@ typedef struct {
enum {
EV_QUEUE_KEY, /* xf86PostKeyboardEvent() */
EV_QUEUE_BTN, /* xf86PostButtonEvent() */
+ EV_QUEUE_PROXIMITY, /* xf86PostProximityEvent() */
} type;
int key; /* May be either a key code or button number. */
int val; /* State of the key/button; pressed or released. */
@@ -131,7 +132,8 @@ typedef struct {
BOOL invert_y;
int delta[REL_CNT];
- unsigned int abs, rel;
+ unsigned int abs, rel, prox;
+ unsigned int abs_prox; /* valuators posted while out of prox? */
/* XKB stuff has to be per-device rather than per-driver */
#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) < 5
@@ -198,6 +200,7 @@ typedef struct {
/* Event posting functions */
void EvdevQueueKbdEvent(InputInfoPtr pInfo, struct input_event *ev, int value);
void EvdevQueueButtonEvent(InputInfoPtr pInfo, int button, int value);
+void EvdevQueueProximityEvent(InputInfoPtr pInfo, int value);
void EvdevPostButtonEvent(InputInfoPtr pInfo, int button, int value);
void EvdevQueueButtonClicks(InputInfoPtr pInfo, int button, int count);
void EvdevPostRelativeMotionEvents(InputInfoPtr pInfo, int num_v, int first_v,