mirror of
https://github.com/X11Libre/xserver.git
synced 2026-04-14 17:18:09 +00:00
Add ExtendedGrabDevice handling.
Add XGE handling in DeliverGrabbedEvent. We can now grab something selecting XGE events, but the current code is a bit messy and doesn't work too well yet.
This commit is contained in:
@@ -51,6 +51,8 @@ SOFTWARE.
|
||||
#include "gc.h"
|
||||
#include "window.h"
|
||||
#include "input.h"
|
||||
#include "cursor.h"
|
||||
#include <X11/extensions/XI.h>
|
||||
|
||||
#define EARLIER -1
|
||||
#define SAMETIME 0
|
||||
@@ -693,6 +695,19 @@ extern Bool IsKeyboardDevice(DeviceIntPtr dev);
|
||||
|
||||
|
||||
/* GE stuff */
|
||||
void SetGenericFilter(int extension, Mask* filters);
|
||||
extern void SetGenericFilter(int extension, Mask* filters);
|
||||
|
||||
extern int ExtGrabDevice(ClientPtr client,
|
||||
DeviceIntPtr dev,
|
||||
int grabmode,
|
||||
int device_mode,
|
||||
WindowPtr grabWindow,
|
||||
WindowPtr confineTo,
|
||||
TimeStamp ctime,
|
||||
Bool ownerEvents,
|
||||
CursorPtr cursor,
|
||||
Mask core_mask,
|
||||
Mask xi_mask,
|
||||
GenericMaskPtr ge_masks);
|
||||
|
||||
#endif /* DIX_H */
|
||||
|
||||
@@ -102,6 +102,22 @@ 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
|
||||
* different fields being set.
|
||||
* If the grab is a core grab (GrabPointer/GrabKeyboard), then the eventMask
|
||||
* is a combination of standard event masks (i.e. PointerMotionMask |
|
||||
* ButtonPressMask).
|
||||
* If the grab is a device grab (GrabDevice), then the eventMask is a
|
||||
* combination of event masks for a given XI event type (see SetEventInfo).
|
||||
*/
|
||||
typedef struct _GrabRec {
|
||||
GrabPtr next; /* for chain of passive grabs */
|
||||
XID resource;
|
||||
@@ -119,6 +135,7 @@ typedef struct _GrabRec {
|
||||
WindowPtr confineTo; /* always NULL for keyboards */
|
||||
CursorPtr cursor; /* always NULL for keyboards */
|
||||
Mask eventMask;
|
||||
GenericMaskPtr genericMasks; /* null terminated list */
|
||||
} GrabRec;
|
||||
|
||||
typedef struct _KeyClassRec {
|
||||
|
||||
@@ -243,6 +243,7 @@ typedef struct _Box *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
|
||||
|
||||
Reference in New Issue
Block a user