[PATCH inputproto] XI 2.1: Add XI2-specific defines for grab and property requests
Peter Hutterer
peter.hutterer at who-t.net
Thu Jun 2 22:26:20 PDT 2011
XI 2.0 headers forced clients to mix XI2 specific constants with defines for
core input. Most notable here are the grab code which required GrabModeAsync
or GrabModeSync from core, but _not_ AnyModifier (XIAnymodifier !=
AnyModifier). This is a hard-to-debug cause for bugs.
Add defines for grab modes, grab return codes and property modes as well as
a define for the AnyPropertyType. These defines are identical to the ones
defined in core but stop the use of input-related defines from either core
or XI 1.x.
Clients must use the core defines None and CurrentTime where applicable.
Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
---
This has no functional effect since all of these defines are identical to
core defines. However, having XIFoobar constants for everything but this is
bad - it's not clear which calls don't have the required constants and where
they should be mixed. In the case of AnyModifier this can cause
unexpected behaviour since everthing appears to be fine except the grab
never triggers.
XI2.h | 19 +++++++++++++++++++
1 files changed, 19 insertions(+), 0 deletions(-)
diff --git a/XI2.h b/XI2.h
index 4c7feb6..1d0f399 100644
--- a/XI2.h
+++ b/XI2.h
@@ -44,6 +44,14 @@
#define XIPropertyCreated 1
#define XIPropertyModified 2
+/* Property modes */
+#define XIPropModeReplace 0
+#define XIPropModePrepend 1
+#define XIPropModeAppend 2
+
+/* Special property type used for XIGetProperty */
+#define XIAnyPropertyType 0L
+
/* Enter/Leave and Focus In/Out modes */
#define XINotifyNormal 0
#define XINotifyGrab 1
@@ -62,6 +70,17 @@
#define XINotifyPointerRoot 6
#define XINotifyDetailNone 7
+/* Grab modes */
+#define XIGrabModeSync 0
+#define XIGrabModeAsync 1
+
+/* Grab reply status codes */
+#define XIGrabSuccess 0
+#define XIAlreadyGrabbed 1
+#define XIGrabInvalidTime 2
+#define XIGrabNotViewable 3
+#define XIGrabFrozen 4
+
/* Passive grab types */
#define XIGrabtypeButton 0
#define XIGrabtypeKeycode 1
--
1.7.5.1
More information about the xorg-devel
mailing list