summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOlivier Fourdan <ofourdan@redhat.com>2021-02-16 15:32:47 +0100
committerMichel Dänzer <michel@daenzer.net>2021-02-17 11:55:19 +0000
commitb16dbd878d5fefb3855d65437bcd698e5dfec129 (patch)
tree9c2b96490d5249ac0bc2d9c3cf8c86faff3f874c
parent4d2128fd1dc2ff7293e8b95b956ddb07ddb15de9 (diff)
downloadxserver-b16dbd878d5fefb3855d65437bcd698e5dfec129.tar.gz
xwayland: Add PtrFeedback to the touch device
Trying to change the acceleration/threshold on Xwayland cannot work, and the corresponding handler xwl_pointer_control() is a no-op. Yet, an X11 client trying to change those on the touch device may possibly cause a crash because the touch device in Xwayland doesn't set that. Initialize the touch device's PtrFeedback to make sure that just cannot happen. Signed-off-by: Olivier Fourdan <ofourdan@redhat.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Closes: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1137 (cherry picked from commit ab76272a7d2bff997985893c89147412a7360310)
-rw-r--r--hw/xwayland/xwayland-input.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/hw/xwayland/xwayland-input.c b/hw/xwayland/xwayland-input.c
index 3e4fe2b91..9b7421059 100644
--- a/hw/xwayland/xwayland-input.c
+++ b/hw/xwayland/xwayland-input.c
@@ -312,6 +312,10 @@ xwl_touch_proc(DeviceIntPtr device, int what)
0, 0xFFFF, 10000, 0, 10000, Absolute);
InitValuatorAxisStruct(device, 1, axes_labels[1],
0, 0xFFFF, 10000, 0, 10000, Absolute);
+
+ if (!InitPtrFeedbackClassDeviceStruct(device, xwl_pointer_control))
+ return BadValue;
+
return Success;
case DEVICE_ON: