[PATCH 2/3] Xi: add RT_ACTIVEGRAB resource type, used for labelling only

Peter Hutterer peter.hutterer at who-t.net
Thu Nov 1 22:17:12 PDT 2012


RT_ACTIVEGRAB will be used in touch handling to label listeners that have an
active grab.

The actual resource has no other information.

Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
---
 Xi/exglobals.h | 1 +
 Xi/extinit.c   | 4 +++-
 2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/Xi/exglobals.h b/Xi/exglobals.h
index 9f235e0..0e91219 100644
--- a/Xi/exglobals.h
+++ b/Xi/exglobals.h
@@ -77,6 +77,7 @@ extern int DevicePresenceNotify;
 extern int DevicePropertyNotify;
 
 extern RESTYPE RT_INPUTCLIENT;
+extern RESTYPE RT_ACTIVEGRAB;
 
 extern DevPrivateKeyRec XIClientPrivateKeyRec;
 
diff --git a/Xi/extinit.c b/Xi/extinit.c
index 7e30755..1b8d0f0 100644
--- a/Xi/extinit.c
+++ b/Xi/extinit.c
@@ -352,6 +352,7 @@ int DevicePresenceNotify;
 int DevicePropertyNotify;
 
 RESTYPE RT_INPUTCLIENT;
+RESTYPE RT_ACTIVEGRAB;
 
 /*****************************************************************
  *
@@ -1272,7 +1273,8 @@ XInputExtensionInit(void)
         MakeDeviceTypeAtoms();
         RT_INPUTCLIENT = CreateNewResourceType((DeleteType) InputClientGone,
                                                "INPUTCLIENT");
-        if (!RT_INPUTCLIENT)
+        RT_ACTIVEGRAB = CreateNewResourceType(NULL, "ACTIVEGRAB");
+        if (!RT_INPUTCLIENT || !RT_ACTIVEGRAB)
             FatalError("Failed to add resource type for XI.\n");
         FixExtensionEvents(extEntry);
         ReplySwapVector[IReqCode] = (ReplySwapPtr) SReplyIDispatch;
-- 
1.7.11.7



More information about the xorg-devel mailing list