mirror of
https://github.com/X11Libre/xserver.git
synced 2026-10-04 22:36:10 +00:00
dix, mi: stop segfaults when a floating device emits events.
For pointers: don't try to set master->valuator fields if there is no master. For keyboards: check if device is valid before trying to access the fields in miPointerGetScreen (btw. this disables DGA events for floating keyboards). Also stop the hideous number of ErrorFs if we request the paired device for a floating dev.
This commit is contained in:
parent
3063f0c667
commit
59b304d8a2
3 changed files with 7 additions and 7 deletions
|
|
@ -736,8 +736,11 @@ GetPointerEvents(EventList *events, DeviceIntPtr pDev, int type, int buttons,
|
|||
|
||||
pDev->valuator->lastx = x;
|
||||
pDev->valuator->lasty = y;
|
||||
master->valuator->lastx = x;
|
||||
master->valuator->lasty = y;
|
||||
if (master)
|
||||
{
|
||||
master->valuator->lastx = x;
|
||||
master->valuator->lasty = y;
|
||||
}
|
||||
|
||||
if (!coreOnly)
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in a new issue