summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2009-05-28 08:20:37 +1000
committerPeter Hutterer <peter.hutterer@who-t.net>2009-05-28 14:47:49 +1000
commit6b61bef5da91ca24d1bfcf9d314b8b8587c3e4fc (patch)
tree04bd15aa72268837474cbea453120c4908617182
parent1b2dc24bf51a325ea3fafb46768467675b00be52 (diff)
Mirror the core enter/focus modes and add the passive grab mode.
If an enter/focus grabs activates (or deactivates), send an extra set of enter/focus in (or leave/focus out) events to the grabbing client with mode XIPassiveGrabNotify. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
-rw-r--r--XI2.h8
-rw-r--r--XI2proto.txt13
2 files changed, 20 insertions, 1 deletions
diff --git a/XI2.h b/XI2.h
index 6c58926..4765853 100644
--- a/XI2.h
+++ b/XI2.h
@@ -33,6 +33,14 @@
#define XIPropertyCreated 1
#define XIPropertyModified 2
+/* Enter/Leave and Focus In/Out modes */
+#define XINotifyNormal 0
+#define XINotifyGrab 1
+#define XINotifyUngrab 2
+#define XINotifyWhileGrabbed 3
+#define XINotifyPassiveGrab 4
+#define XINotifyPassiveUngrab 5
+
/* Passive grab types */
#define XIGrabtypeButton 0
#define XIGrabtypeKeysym 1
diff --git a/XI2proto.txt b/XI2proto.txt
index 01f6c6b..91fde4e 100644
--- a/XI2proto.txt
+++ b/XI2proto.txt
@@ -1013,6 +1013,15 @@ XI2. Clients should ignore this data.
with mode Grab are generated as if the focus were to change from the
current window to the grab_window.
+ If an enter or focus in grab activates, additional EnterNotify events
+ with mode XIPassiveGrabNotify are generated as if the pointer or focus
+ were to suddenly warp from its current position to some position in
+ the grab window. These events are sent to the grabbing client only
+ and only if the grab event mask has selected for it. If such a passive
+ grab deactivates, addional LeaveNotify events with mode
+ XIPassiveUngrabNotify are generated and sent to the grabbing client
+ before the grab deactivates.
+
┌───
XIPassiveUngrabDevice
deviceid: DEVICEID
@@ -1497,7 +1506,9 @@ EVENTHEADER { type: BYTE
mode
Normal pointer motion events have mode Normal. Pseudo-motion events
when a grab activates have mode Grab, and pseudo-motion events when a
- grab deactivates have mode Ungrab.
+ grab deactivates have mode Ungrab. Pseudo-motion events caused by the
+ activation or deactivation of a passive enter or focus in grab have mode
+ XIPassiveGrabNotify or XIPassiveUngrabNotify.
detail
Specifies the relation of the event window to the window the pointer
entered or left. See the core protocol spec for details.