mirror of
https://gitlab.freedesktop.org/xorg/xserver.git
synced 2026-02-14 22:40:29 +01:00
Xi: disallow grabbing disabled devices
Grabbing a disabled (pointer) device will lead to a segfault later
in the myriad of places where we look at the device's spriteInfo - which
will be NULL.
As a workaround, disallow grabbing a disabled device by pretending it's
already grabbed. Since the point of a grab is to receive all events by
that device and disabled devices cannot send events, this should be Good
Enough.
Tested-by: Olivier Fourdan <ofourdan@redhat.com>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1856>
(cherry picked from commit 797f63b8be)
This commit is contained in:
parent
7d0a36ff83
commit
ef33d433d1
1 changed files with 3 additions and 0 deletions
|
|
@ -81,6 +81,9 @@ ProcXIGrabDevice(ClientPtr client)
|
|||
if (ret != Success)
|
||||
return ret;
|
||||
|
||||
if (!dev->enabled)
|
||||
return AlreadyGrabbed;
|
||||
|
||||
if (!IsMaster(dev))
|
||||
stuff->paired_device_mode = GrabModeAsync;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue