From 53b58e679f977550301130794c8cb19391ecceb7 Mon Sep 17 00:00:00 2001 From: Daniel Stone Date: Tue, 15 Feb 2011 14:27:53 +0000 Subject: [PATCH] Add XIPointerEmulated for emulated events 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 Reviewed-by: Peter Hutterer --- XI2.h | 1 + specs/XI2proto.txt | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) 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 8736b18..5d50b45 100644 --- a/specs/XI2proto.txt +++ b/specs/XI2proto.txt @@ -1526,7 +1526,7 @@ For a detailed description of classes, see the XIQueryDevice 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 @@ -1571,6 +1571,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 signals 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: