summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorOlivier Fourdan <ofourdan@redhat.com>2021-02-11 09:48:12 +0100
committerOlivier Fourdan <ofourdan@redhat.com>2021-02-15 09:42:00 +0100
commitb5e1f13681090fc327dc2cabee1dc123273e785b (patch)
tree47276ce2e4f7754604fb7c29d024035018cca48d /include
parent213129012bc0fe508a8a4180ffda1ef661894049 (diff)
dix: Add POINTER_RAWONLY flag
This add a new flag POINTER_RAWONLY for GetPointerEvents() which does pretty much the opposite of POINTER_NORAW. Basically, this tells GetPointerEvents() that we only want the DeviceChanged events and any raw events for this motion but no actual motion events. This is preliminary work for Xwayland to be able to use relative motion events for raw events. Xwayland would use absolute events for raw events, but some X11 clients (wrongly) assume raw events to be always relative. To allow such clients to work with Xwayland, it needs to switch to relative raw events (if those are available from the Wayland compositor). However, Xwayland cannot use relative motion events for actual pointer location because that would cause a drift over time, the pointer being actually controlled by the Wayland compositor. So Xwayland needs to be able to send only relative raw events, hence this API. Bump the ABI_XINPUT_VERSION minor version to reflect that API addition. v2: Actually avoid sending motion events (Peter) v3: Keep sending raw emulated events with RAWONLY (Peter) Suggested-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Olivier Fourdan <ofourdan@redhat.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Related: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1130
Diffstat (limited to 'include')
-rw-r--r--include/input.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/input.h b/include/input.h
index 0208562d9..98fdf0aed 100644
--- a/include/input.h
+++ b/include/input.h
@@ -94,6 +94,7 @@ SOFTWARE.
#define POINTER_NORAW (1 << 5) /* Don't generate RawEvents */
#define POINTER_EMULATED (1 << 6) /* Event was emulated from another event */
#define POINTER_DESKTOP (1 << 7) /* Data in desktop coordinates */
+#define POINTER_RAWONLY (1 << 8) /* Only generate RawEvents */
/* GetTouchEvent flags */
#define TOUCH_ACCEPT (1 << 0)