diff options
author | Peter Hutterer <peter.hutterer@who-t.net> | 2009-02-23 15:58:07 +1000 |
---|---|---|
committer | Peter Hutterer <peter.hutterer@who-t.net> | 2009-03-20 15:17:55 +1000 |
commit | 8b6a370058ad5a20e0a0e49ec9443daf03775de8 (patch) | |
tree | 9c681008defdd3226fbd50cd7c44aff392298ccf /include/inputstr.h | |
parent | 38bba0c1b75b84e8bbdfa7975cf701a9414a3afd (diff) |
Add XI2 masks and XISelectEvent() request handling.
XI2 event masks are simply stored in the OtherEventMasks as a separate field.
This replaces the XiSelectEvent code.
Diffstat (limited to 'include/inputstr.h')
-rw-r--r-- | include/inputstr.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/include/inputstr.h b/include/inputstr.h index 3edd33f7d..678c171c5 100644 --- a/include/inputstr.h +++ b/include/inputstr.h @@ -55,6 +55,7 @@ SOFTWARE. #include "cursorstr.h" #include "geext.h" #include "privates.h" +#include <X11/extensions/XI2proto.h> #define BitIsOn(ptr, bit) (((BYTE *) (ptr))[(bit)>>3] & (1 << ((bit) & 7))) #define SetBit(ptr, bit) (((BYTE *) (ptr))[(bit)>>3] |= (1 << ((bit) & 7))) @@ -63,7 +64,8 @@ SOFTWARE. #define SameClient(obj,client) \ (CLIENT_BITS((obj)->resource) == (client)->clientAsMask) -#define EMASKSIZE MAXDEVICES + 1 +#define EMASKSIZE MAXDEVICES + 2 +#define XI2MASKSIZE ((XI_LASTEVENT + 7)/8) /* no of bits for masks */ /** * This struct stores the core event mask for each client except the client @@ -98,6 +100,8 @@ typedef struct _InputClients { InputClientsPtr next; /**< Pointer to the next mask */ XID resource; /**< id for putting into resource manager */ Mask mask[EMASKSIZE]; /**< Actual XI event mask, deviceid is index */ + /** XI2 event masks. One per device, each bit is a mask of (1 << type) */ + unsigned char xi2mask[EMASKSIZE][XI2MASKSIZE]; } InputClients; /** @@ -126,6 +130,8 @@ typedef struct _OtherInputMasks { Mask dontPropagateMask[EMASKSIZE]; /** The clients that selected for events */ InputClientsPtr inputClients; + /* XI2 event masks. One per device, each bit is a mask of (1 << type) */ + unsigned char xi2mask[EMASKSIZE][XI2MASKSIZE]; } OtherInputMasks; /* |