mirror of
https://gitlab.freedesktop.org/xorg/xserver.git
synced 2026-03-11 14:10:53 +01:00
Fix two incorrect checks for master devices.
These two were sideeffects of lastSlave being in the same field as the master. For devices generated by the master device directly, lastSlave was 0 and the device would (with the old checks) be interpreted as floating. Add the required checks to safeguard against master devices. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Benjamin Tissoires <tissoire@cena.fr>
This commit is contained in:
parent
d63c979c7f
commit
dc32a23890
2 changed files with 4 additions and 1 deletions
|
|
@ -710,6 +710,9 @@ ChangeMasterDeviceClasses(DeviceIntPtr device, DeviceChangedEvent *dce)
|
|||
if (rc != Success)
|
||||
return; /* Device has disappeared */
|
||||
|
||||
if (IsMaster(slave))
|
||||
return;
|
||||
|
||||
if (!slave->u.master)
|
||||
return; /* set floating since the event */
|
||||
|
||||
|
|
|
|||
|
|
@ -325,7 +325,7 @@ CopyGetMasterEvent(DeviceIntPtr sdev,
|
|||
CHECKEVENT(original);
|
||||
|
||||
/* ET_XQuartz has sdev == NULL */
|
||||
if (!sdev || !sdev->u.master)
|
||||
if (!sdev || IsMaster(sdev) || !sdev->u.master)
|
||||
return NULL;
|
||||
|
||||
#if XFreeXDGA
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue