[PATCH inputproto multitouch 1/2] Introduce Touch grab mode
Chase Douglas
chase.douglas at canonical.com
Wed Aug 24 18:39:20 PDT 2011
Touch grabs are not really synchronous nor asynchronous. Use a separate
grab mode value for touch grabs, just to make the protocol seem more
sane.
Signed-off-by: Chase Douglas <chase.douglas at canonical.com>
---
XI2.h | 1 +
specs/XI2proto.txt | 11 +++++++++--
2 files changed, 10 insertions(+), 2 deletions(-)
diff --git a/XI2.h b/XI2.h
index f6bdbb2..2aea35e 100644
--- a/XI2.h
+++ b/XI2.h
@@ -72,6 +72,7 @@
/* Grab modes */
#define XIGrabModeSync 0
#define XIGrabModeAsync 1
+#define XIGrabModeTouch 2
/* Grab reply status codes */
#define XIGrabSuccess 0
diff --git a/specs/XI2proto.txt b/specs/XI2proto.txt
index 4650997..82f2b42 100644
--- a/specs/XI2proto.txt
+++ b/specs/XI2proto.txt
@@ -1382,7 +1382,7 @@ you pass to the event-mode argument:
grab_window: Window
cursor: Cursor
owner_events: Bool
- grab_mode: { Synchronous, Asynchronous }
+ grab_mode: { Synchronous, Asynchronous, Touch* }
paired_device_mode: { Synchronous, Asynchronous }
num_modifiers: INT16
mask_len: CARD16
@@ -1399,6 +1399,8 @@ you pass to the event-mode argument:
GRABMODIFIERINFO { status: Access
modifiers: CARD32 }
+* since XI 2.1
+
Establish an explicit passive grab for a button or keycode
on the specified input device.
@@ -1425,7 +1427,9 @@ on the specified input device.
generated by the server until the grabbing client issues a
releasing XIAllowEvents request or until the device grab is
released. Actual device input events are not lost while the device
- is frozen; they are simply queued for later processing.
+ is frozen; they are simply queued for later processing. If grab_type
+ is GrabtypeTouchBegin, grab_mode must be set to Touch.
+ grabs, grab
mask_len
Length of mask in 4 byte units.
mask
@@ -1549,6 +1553,9 @@ grab deactivates, addional LeaveNotify events with mode
XIPassiveUngrabNotify are generated and sent to the grabbing client
before the grab deactivates.
+For GrabtypeTouchBegin, grab_mode must be Touch or a BadValue error
+is generated.
+
See section 4.4 for additional notes on touch grabs, as they do not
behave like traditional grabs: in particular, they do not freeze the
device, and delivery of touch events continues even if the device is
--
1.7.4.1
More information about the xorg-devel
mailing list