summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2023-12-21 11:34:26 +1000
committerOlivier Fourdan <ofourdan@redhat.com>2024-01-11 10:03:17 +0100
commit335d2c9fc896b0ca3d2d8e0388724dc039838338 (patch)
tree33df925f51bfeac10a5ccd1c0be52bafc4644b9e
parentd5c278fab44ca1ac76cd447f5f037c791b1f2620 (diff)
xwayland: override the XTest sendEventsProc for all devices
Otherwise only XTest events on the XTest device get handled, XTest requests on real devices are still processed as normal events. (cherry picked from commit 7f7adfdef803d548b867e032586783ab00288381)
-rw-r--r--hw/xwayland/xwayland-xtest.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/hw/xwayland/xwayland-xtest.c b/hw/xwayland/xwayland-xtest.c
index def8926d8..e4a297ab5 100644
--- a/hw/xwayland/xwayland-xtest.c
+++ b/hw/xwayland/xwayland-xtest.c
@@ -647,6 +647,9 @@ xwayland_xtest_send_events(DeviceIntPtr dev,
struct xwl_ei_client *xwl_ei_client;
bool accept = false;
+ if (!IsXTestDevice(dev, NULL))
+ return;
+
client = GetCurrentClient();
xwl_ei_client = get_xwl_ei_client(client);
if (!xwl_ei_client) {
@@ -915,9 +918,7 @@ xwayland_override_xtest(void)
DeviceIntPtr d;
nt_list_for_each_entry(d, inputInfo.devices, next) {
- if (IsXTestDevice(d, NULL)) {
- xwayland_override_events_proc(d);
- }
+ xwayland_override_events_proc(d);
}
}
@@ -927,8 +928,6 @@ xwayland_restore_xtest(void)
DeviceIntPtr d;
nt_list_for_each_entry(d, inputInfo.devices, next) {
- if (IsXTestDevice(d, NULL)) {
- xwayland_restore_events_proc(d);
- }
+ xwayland_restore_events_proc(d);
}
}