[PATCH inputproto 1/2] Add XIPointerEmulated for emulated events
Peter Hutterer
peter.hutterer at who-t.net
Sun Jun 19 23:29:55 PDT 2011
On Thu, Jun 09, 2011 at 06:26:00PM +0100, Daniel Stone wrote:
> 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>
> ---
> XI2.h | 1 +
> specs/XI2proto.txt | 5 ++++-
> 2 files changed, 5 insertions(+), 1 deletions(-)
>
> diff --git a/XI2.h b/XI2.h
> index 4c7feb6..48b34a8 100644
> --- a/XI2.h
> +++ b/XI2.h
> @@ -124,6 +124,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 4437d0e..63277ca 100644
> --- a/specs/XI2proto.txt
> +++ b/specs/XI2proto.txt
> @@ -1546,7 +1546,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
> @@ -1591,6 +1591,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 means that the event has been emulated from another
s/means/signals/
but either way, Reviewed-by: Peter Hutterer <peter.hutterer at who-t.net>
of course, one of the questions we should ask ourselves now is whether it is
is worth adding a serial number to events to allow clients to connect the
emulated vs real event.
Cheers,
Peter
> + 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.5.3
More information about the xorg-devel
mailing list