mirror of
https://github.com/X11Libre/xserver.git
synced 2026-09-22 20:35:43 +00:00
Use the same struct for generic event masks throughout the code.
Renaming those structs too. Previously grabs were using a different struct than windows, which was reasonably stupid.
This commit is contained in:
parent
c1a16bdcfe
commit
5ccc09b182
9 changed files with 66 additions and 68 deletions
|
|
@ -52,6 +52,7 @@ SOFTWARE.
|
|||
#include "window.h"
|
||||
#include "input.h"
|
||||
#include "cursor.h"
|
||||
#include "geext.h"
|
||||
#include <X11/extensions/XI.h>
|
||||
|
||||
#define EARLIER -1
|
||||
|
|
|
|||
|
|
@ -53,6 +53,7 @@ SOFTWARE.
|
|||
#include "window.h"
|
||||
#include "dixstruct.h"
|
||||
#include "cursorstr.h"
|
||||
#include "geext.h"
|
||||
|
||||
#define BitIsOn(ptr, bit) (((BYTE *) (ptr))[(bit)>>3] & (1 << ((bit) & 7)))
|
||||
|
||||
|
|
@ -102,12 +103,6 @@ typedef struct _DetailRec { /* Grab details may be bit masks */
|
|||
Mask *pMask;
|
||||
} DetailRec;
|
||||
|
||||
typedef struct _GenericMaskRec {
|
||||
int extension;
|
||||
Mask mask;
|
||||
struct _GenericMaskRec* next;
|
||||
} GenericMaskRec;
|
||||
|
||||
/**
|
||||
* Central struct for device grabs.
|
||||
* The same struct is used for both core grabs and device grabs, with
|
||||
|
|
@ -139,7 +134,7 @@ typedef struct _GrabRec {
|
|||
CursorPtr cursor; /* always NULL for keyboards */
|
||||
Mask eventMask;
|
||||
Mask deviceMask;
|
||||
GenericMaskPtr genericMasks; /* null terminated list */
|
||||
GenericMaskPtr genericMasks;
|
||||
} GrabRec;
|
||||
|
||||
typedef struct _KeyClassRec {
|
||||
|
|
|
|||
|
|
@ -243,7 +243,6 @@ typedef struct pixman_box16 *BoxPtr;
|
|||
typedef struct _xEvent *xEventPtr;
|
||||
typedef struct _xRectangle *xRectanglePtr;
|
||||
typedef struct _GrabRec *GrabPtr;
|
||||
typedef struct _GenericMaskRec *GenericMaskPtr;
|
||||
|
||||
/* typedefs from other places - duplicated here to minimize the amount
|
||||
* of unnecessary junk that one would normally have to include to get
|
||||
|
|
|
|||
|
|
@ -77,17 +77,15 @@ typedef struct _DevCursorNode {
|
|||
struct _DevCursorNode* next;
|
||||
} DevCursNodeRec, *DevCursNodePtr, *DevCursorList;
|
||||
|
||||
typedef struct _GEClientRec {
|
||||
Mask eventMask[MAXEXTENSIONS];
|
||||
ClientPtr client;
|
||||
struct _GEClientRec* next;
|
||||
} GEClientRec, *GEClientPtr;
|
||||
|
||||
/* Mask structure for GE extension. Allows one mask per extension. */
|
||||
typedef struct _GEEventMasks {
|
||||
Mask eventMasks[MAXEXTENSIONS];
|
||||
struct _GEClientRec* geClients;
|
||||
} GEEventMasksRec, *GEEventMasksPtr;
|
||||
/* Mask structure for GE extension as stored on the window.
|
||||
* Allows one mask per extension.
|
||||
* .eventMask - Summary mask for all clients, used for quick checking.
|
||||
* .geClients - list of clients with their specific mask.
|
||||
*/
|
||||
typedef struct _GenericClientMasks {
|
||||
Mask eventMasks[MAXEXTENSIONS];
|
||||
GenericMaskPtr geClients;
|
||||
} GenericClientMasksRec, *GenericClientMasksPtr;
|
||||
|
||||
typedef struct _WindowAccessRec {
|
||||
int defaultRule; /* WindowAccessDenyAll */
|
||||
|
|
@ -117,7 +115,7 @@ typedef struct _WindowOpt {
|
|||
struct _OtherInputMasks *inputMasks; /* default: NULL */
|
||||
#endif
|
||||
DevCursorList deviceCursors; /* default: NULL */
|
||||
struct _GEEventMasks* geMasks; /* default: NULL */
|
||||
struct _GenericClientMasks *geMasks;/* default: NULL */
|
||||
WindowAccessRec access;
|
||||
} WindowOptRec, *WindowOptPtr;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue