dix: initialize the XTest sendEventsProc for all devices
XTest requests lets the client specify a device ID, only if none is specified do we fall back to the XTEST special device. As of commitaa4074251
input: Add new hook DeviceSendEventsProc for XTEST regular devices are no longer able to send XTest events because they have no sendEventsProc set. This caused issue #1574 and the crash was fixed with commite820030de
xtest: Check whether there is a sendEventsProc to call but we still cannot send XTest events through a specific device. Fix this by defaulting every device to the XTest send function and punting it to the DDX (i.e. Xwayland) to override the devices as necessary. Fixese820030de2
Fixesaa4074251f
This commit is contained in:
parent
7f7adfdef8
commit
de0031eefd
|
@ -148,7 +148,7 @@ ProcXTestCompareCursor(ClientPtr client)
|
|||
return Success;
|
||||
}
|
||||
|
||||
static void
|
||||
void
|
||||
XTestDeviceSendEvents(DeviceIntPtr dev,
|
||||
int type,
|
||||
int detail,
|
||||
|
@ -645,9 +645,6 @@ AllocXTestDevice(ClientPtr client, const char *name,
|
|||
XIGetKnownProperty(XI_PROP_XTEST_DEVICE),
|
||||
FALSE);
|
||||
XIRegisterPropertyHandler(*keybd, DeviceSetXTestProperty, NULL, NULL);
|
||||
|
||||
(*ptr)->sendEventsProc = XTestDeviceSendEvents;
|
||||
(*keybd)->sendEventsProc = XTestDeviceSendEvents;
|
||||
}
|
||||
|
||||
free(xtestname);
|
||||
|
|
|
@ -283,6 +283,8 @@ AddInputDevice(ClientPtr client, DeviceProc deviceProc, Bool autoStart)
|
|||
dev->deviceGrab.DeactivateGrab = DeactivateKeyboardGrab;
|
||||
dev->deviceGrab.sync.event = calloc(1, sizeof(InternalEvent));
|
||||
|
||||
dev->sendEventsProc = XTestDeviceSendEvents;
|
||||
|
||||
XkbSetExtension(dev, ProcessKeyboardEvent);
|
||||
|
||||
dev->coreEvents = TRUE;
|
||||
|
|
|
@ -305,4 +305,11 @@ XISetEventMask(DeviceIntPtr dev, WindowPtr win, ClientPtr client,
|
|||
extern int
|
||||
XICheckInvalidMaskBits(ClientPtr client, unsigned char *mask, int len);
|
||||
|
||||
void
|
||||
XTestDeviceSendEvents(DeviceIntPtr dev,
|
||||
int type,
|
||||
int detail,
|
||||
int flags,
|
||||
const ValuatorMask *mask);
|
||||
|
||||
#endif /* EXEVENTS_H */
|
||||
|
|
Loading…
Reference in New Issue