xserver: Branch 'master'
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Thu Mar 6 18:25:24 UTC 2025
Xi/xigrabdev.c | 3 +++
1 file changed, 3 insertions(+)
New commits:
commit 797f63b8be1693a7c0ae5df8b76911d804959ce5
Author: Peter Hutterer <peter.hutterer at who-t.net>
Date: Thu Mar 6 09:40:22 2025 +1000
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 at redhat.com>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1856>
diff --git a/Xi/xigrabdev.c b/Xi/xigrabdev.c
index 0ea42db88..f7fea9cf3 100644
--- a/Xi/xigrabdev.c
+++ b/Xi/xigrabdev.c
@@ -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;
More information about the xorg-commit
mailing list