From c94ea5bc055e4efc323e84b7a8266e8b8a4af48e Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Sun, 12 Apr 2009 17:38:28 +1000 Subject: input: use a GrabMask union in GrabDevice to allow for XI2 masks. Signed-off-by: Peter Hutterer --- include/dix.h | 2 +- include/input.h | 1 + include/inputstr.h | 6 ++++++ 3 files changed, 8 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/dix.h b/include/dix.h index 8da218936..d4e503925 100644 --- a/include/dix.h +++ b/include/dix.h @@ -433,7 +433,7 @@ extern int GrabDevice( Window /* grabWindow */, unsigned /* ownerEvents */, Time /* ctime */, - Mask /* mask */, + GrabMask* /* mask */, int /* grabtype */, Cursor /* curs */, Window /* confineToWin */, diff --git a/include/input.h b/include/input.h index baac05448..bc9c5beaf 100644 --- a/include/input.h +++ b/include/input.h @@ -103,6 +103,7 @@ typedef struct _OtherClients *OtherClientsPtr; typedef struct _InputClients *InputClientsPtr; typedef struct _DeviceIntRec *DeviceIntPtr; typedef struct _ClassesRec *ClassesPtr; +typedef union _GrabMask GrabMask; typedef struct _EventList { xEvent* event; diff --git a/include/inputstr.h b/include/inputstr.h index 7d666c15d..e562c0a13 100644 --- a/include/inputstr.h +++ b/include/inputstr.h @@ -156,6 +156,12 @@ typedef enum { GRABTYPE_XI2 } GrabType; +union _GrabMask { + Mask core; + Mask xi; + char xi2mask[EMASKSIZE][XI2MASKSIZE]; +}; + /** * Central struct for device grabs. * The same struct is used for both core grabs and device grabs, with -- cgit v1.2.3