summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilipp Reh <sefi@s-e-f-i.de>2011-05-18 18:28:15 +0200
committerPeter Hutterer <peter.hutterer@who-t.net>2011-06-02 16:02:38 +1000
commit844d855eacfb9a9639a1e3236a268df1a6da190c (patch)
tree69fd50e9aa55961a47cb7daf811b7199fdd51453
parentc5b4f1114fe6a1bc9f72b783d19cf26bc8fa1711 (diff)
XI2.1: Add confine_to to XIGrabDevice.
Updated the specs for XIGrabDevice which now sends an additional confine_to parameter after the mask. The confine_to behaviour is the same as the core event behaviour: if the device is a master pointer, the confine_to window determines the window the cursor is confined to during the grab. Changes in protocol behaviour to XI 2.0: XIGrabDevice may return NotViewable if the confine_to is not viewable. Signed-off-by: Philipp Reh <sefi@s-e-f-i.de> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
-rw-r--r--specs/XI2proto.txt12
1 files changed, 11 insertions, 1 deletions
diff --git a/specs/XI2proto.txt b/specs/XI2proto.txt
index 5abf9d4..31c2647 100644
--- a/specs/XI2proto.txt
+++ b/specs/XI2proto.txt
@@ -39,6 +39,7 @@ device information in each event (with the exception of core events).
Changes introduced by version 2.1
- RawEvents are sent regardless of the grab state.
+- XIGrabDevice takes a confine_to parameter
// ❧❧❧❧❧❧❧❧❧❧❧
@@ -822,10 +823,13 @@ Return the current focus window for the given device.
cursor: Cursor
mask_len: CARD16
masks: SETofEVENTMASK
+ confine_to*: Window
status: Success, AlreadyGrabbed, Frozen, InvalidTime, NotViewable
└───
+ * since XI 2.1
+
This request actively grabs control of the specified input device. Further
input events from this device are reported only to the grabbing client.
This request overides any previous active grab by this client for this
@@ -851,6 +855,8 @@ device.
Length of mask in 4 byte units.
mask
Event mask. An event mask for an event type T is defined as (1 << T).
+ confine_to
+ The window to confine the pointer to. Can be None.
status
Success or the reason why the grab could not be established.
@@ -887,10 +893,14 @@ devices are frozen; they are simply queued for later processing.
If the cursor is not None and the device is a master pointer device, the
cursor will be displayed until the device is ungrabbed.
+If the client supports XI 2.1 and confine_to is not None and the device is a
+master pointer device, the cursor will be confined to that window.
+
This request fails and returns:
AlreadyGrabbed: If the device is actively grabbed by some other client.
- NotViewable: If grab-window is not viewable.
+ NotViewable: If grab-window or the confine_to window (if any) is not
+ viewable.
InvalidTime: If the specified time is earlier than the last-grab-time for
the specified device or later than the current X server time.
Otherwise, the last-grab-time for the specified device is set