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 <daniel@fooishbar.org>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
Daniel Stone 2011-02-15 14:27:53 +00:00 committed by Peter Hutterer
parent af1fb609be
commit 53b58e679f
2 changed files with 5 additions and 1 deletions

1
XI2.h
View file

@ -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)))

View file

@ -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: