From b16dbd878d5fefb3855d65437bcd698e5dfec129 Mon Sep 17 00:00:00 2001 From: Olivier Fourdan Date: Tue, 16 Feb 2021 15:32:47 +0100 Subject: [PATCH] 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 Reviewed-by: Peter Hutterer Closes: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1137 (cherry picked from commit ab76272a7d2bff997985893c89147412a7360310) --- hw/xwayland/xwayland-input.c | 4 ++++ 1 file changed, 4 insertions(+) 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: