mirror of
https://gitlab.freedesktop.org/xorg/xserver.git
synced 2025-12-20 04:40:02 +01:00
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 commitaa4074251input: 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 commite820030dextest: 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. Fixese820030de2Fixesaa4074251f(cherry picked from commitde0031eefd)
This commit is contained in:
parent
335d2c9fc8
commit
7b3010b26d
3 changed files with 10 additions and 4 deletions
|
|
@ -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…
Add table
Reference in a new issue