mirror of
https://github.com/X11Libre/xserver.git
synced 2026-09-22 20:35:43 +00:00
dix: Each device needs to differ between a core grab and an XI grab,
otherwise a Xi grab may overwrite or release a core grab.
Replace grab and associates with coreGrab and deviceGrab structures,
adjust rest of dix/Xi/etc to compile.
xfree86: Don't check for core devices, we'll have the virtual ones anyway.
If we check, the first mouse device is duplicated and sends
double events.
This commit is contained in:
parent
537bc2ead4
commit
ceca5670fe
17 changed files with 325 additions and 232 deletions
|
|
@ -469,7 +469,8 @@ extern void AllowSome(
|
|||
ClientPtr /* client */,
|
||||
TimeStamp /* time */,
|
||||
DeviceIntPtr /* thisDev */,
|
||||
int /* newState */);
|
||||
int /* newState */,
|
||||
Bool /* core */);
|
||||
|
||||
extern void ReleaseActiveGrabs(
|
||||
ClientPtr client);
|
||||
|
|
|
|||
|
|
@ -455,7 +455,7 @@ extern DeviceIntPtr GetPairedPointer(DeviceIntPtr kbd);
|
|||
extern Bool RegisterPairingClient(ClientPtr client);
|
||||
extern Bool UnregisterPairingClient(ClientPtr client);
|
||||
|
||||
extern DeviceIntPtr GuessFreePointerDevice();
|
||||
extern DeviceIntPtr GuessFreePointerDevice(void);
|
||||
|
||||
/* Window/device based access control */
|
||||
extern Bool ACRegisterClient(ClientPtr client);
|
||||
|
|
|
|||
|
|
@ -300,11 +300,31 @@ typedef struct {
|
|||
#define FROZEN_NO_EVENT 5
|
||||
#define FROZEN_WITH_EVENT 6
|
||||
#define THAW_OTHERS 7
|
||||
typedef struct _GrabInfoRec {
|
||||
TimeStamp grabTime;
|
||||
Bool fromPassiveGrab;
|
||||
GrabRec activeGrab;
|
||||
GrabPtr grab;
|
||||
CARD8 activatingKey;
|
||||
void (*ActivateGrab) (
|
||||
DeviceIntPtr /*device*/,
|
||||
GrabPtr /*grab*/,
|
||||
TimeStamp /*time*/,
|
||||
Bool /*autoGrab*/);
|
||||
void (*DeactivateGrab)(
|
||||
DeviceIntPtr /*device*/);
|
||||
struct {
|
||||
Bool frozen;
|
||||
int state;
|
||||
GrabPtr other; /* if other grab has this frozen */
|
||||
xEvent *event; /* saved to be replayed */
|
||||
int evcount;
|
||||
} sync;
|
||||
} GrabInfoRec, *GrabInfoPtr;
|
||||
|
||||
typedef struct _DeviceIntRec {
|
||||
DeviceRec public;
|
||||
DeviceIntPtr next;
|
||||
TimeStamp grabTime;
|
||||
Bool startup; /* true if needs to be turned on at
|
||||
server intialization time */
|
||||
DeviceProc deviceProc; /* proc(DevicePtr, DEVICE_xx). It is
|
||||
|
|
@ -313,27 +333,11 @@ typedef struct _DeviceIntRec {
|
|||
Bool inited; /* TRUE if INIT returns Success */
|
||||
Bool enabled; /* TRUE if ON returns Success */
|
||||
Bool coreEvents; /* TRUE if device also sends core */
|
||||
GrabPtr grab; /* the grabber - used by DIX */
|
||||
struct {
|
||||
Bool frozen;
|
||||
int state;
|
||||
GrabPtr other; /* if other grab has this frozen */
|
||||
xEvent *event; /* saved to be replayed */
|
||||
int evcount;
|
||||
} sync;
|
||||
GrabInfoRec coreGrab; /* grab on core events */
|
||||
GrabInfoRec deviceGrab; /* grab on device events */
|
||||
Atom type;
|
||||
char *name;
|
||||
CARD8 id;
|
||||
CARD8 activatingKey;
|
||||
Bool fromPassiveGrab;
|
||||
GrabRec activeGrab;
|
||||
void (*ActivateGrab) (
|
||||
DeviceIntPtr /*device*/,
|
||||
GrabPtr /*grab*/,
|
||||
TimeStamp /*time*/,
|
||||
Bool /*autoGrab*/);
|
||||
void (*DeactivateGrab)(
|
||||
DeviceIntPtr /*device*/);
|
||||
KeyClassPtr key;
|
||||
ValuatorClassPtr valuator;
|
||||
ButtonClassPtr button;
|
||||
|
|
|
|||
Loading…
Reference in a new issue