summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOlivier Fourdan <ofourdan@redhat.com>2021-02-15 11:23:59 +0100
committerOlivier Fourdan <fourdan@gmail.com>2021-06-08 08:02:37 +0000
commitd41b43345cde2330648ad1890fb95bdbd5362f7f (patch)
treea35f870f110403d400f77be38e885f5e6000ac34
parent23a53f0d5460eb45f05b0b370dfcec712652598c (diff)
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 a05d178ff..6647914f2 100644
--- a/hw/xwayland/xwayland-input.c
+++ b/hw/xwayland/xwayland-input.c
@@ -279,6 +279,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: