input: replace GrabRec's coreGrab field with grabtype.

Don't allow grabs of different types to override each other.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
Peter Hutterer 2009-04-12 16:19:45 +10:00
commit 09f9a86077
7 changed files with 38 additions and 21 deletions

View file

@ -150,6 +150,12 @@ typedef struct _DetailRec { /* Grab details may be bit masks */
Mask *pMask;
} DetailRec;
typedef enum {
GRABTYPE_CORE,
GRABTYPE_XI,
GRABTYPE_XI2
} GrabType;
/**
* Central struct for device grabs.
* The same struct is used for both core grabs and device grabs, with
@ -171,7 +177,7 @@ typedef struct _GrabRec {
unsigned ownerEvents:1;
unsigned keyboardMode:1;
unsigned pointerMode:1;
unsigned coreGrab:1; /* grab is on core device */
GrabType grabtype;
CARD8 type; /* event type */
DetailRec modifiersDetail;
DeviceIntPtr modifierDevice;