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 ab76272a7d)
This commit is contained in:
Olivier Fourdan 2021-02-16 15:32:47 +01:00 committed by Michel Dänzer
parent 4d2128fd1d
commit b16dbd878d
1 changed files with 4 additions and 0 deletions

View File

@ -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: