[PATCH inputproto 3/4] Add XIPointerEmulated for emulated events
Peter Hutterer
peter.hutterer at who-t.net
Thu Aug 11 21:40:06 PDT 2011
From: Daniel Stone <daniel at fooishbar.org>
The XIPointerEmulated flag on pointer events means that the event was
emulated from a smooth-scroll or touch event to support legacy events,
and the client may ignore this if it is listening to the other events.
Signed-off-by: Daniel Stone <daniel at fooishbar.org>
Reviewed-by: Peter Hutterer <peter.hutterer at who-t.net>
---
XI2.h | 1 +
specs/XI2proto.txt | 5 ++++-
2 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/XI2.h b/XI2.h
index 40a9faf..29ffdd1 100644
--- a/XI2.h
+++ b/XI2.h
@@ -146,6 +146,7 @@
/* Device event flags (key events only) */
#define XIKeyRepeat (1 << 16)
/* Device event flags (pointer events only) */
+#define XIPointerEmulated (1 << 16)
/* XI2 event mask macros */
#define XISetMask(ptr, event) (((unsigned char*)(ptr))[(event)>>3] |= (1 << ((event) & 7)))
diff --git a/specs/XI2proto.txt b/specs/XI2proto.txt
index cbe4d85..06e09cb 100644
--- a/specs/XI2proto.txt
+++ b/specs/XI2proto.txt
@@ -1525,7 +1525,7 @@ For a detailed description of classes, see the XQueryDevice request.
DEVICEEVENTFLAGS (all events): none
DEVICEEVENTFLAGS (key events only): { KeyRepeat }
- DEVICEEVENTFLAGS (pointer events only): none
+ DEVICEEVENTFLAGS (pointer events only): { PointerEmulated }
An XIDeviceEvent is generated whenever the logical state of a device
changes in response to a button press, a button release, a motion, a key
@@ -1570,6 +1570,9 @@ KeyRelease, ButtonPress, ButtonRelease, Motion.
KeyRepeat means that this event is for repeating purposes, and
the physical state of the key has not changed. This is only
valid for KeyPress events.
+ PointerEmulated signaps that the event has been emulated from another
+ XI 2.x event for legacy client support, and that this event should
+ be ignored if the client listens for these events.
Modifier state in mods is detailed as follows:
--
1.7.6
More information about the xorg-devel
mailing list