diff options
author | Olivier Fourdan <ofourdan@redhat.com> | 2021-02-15 11:23:59 +0100 |
---|---|---|
committer | Olivier Fourdan <ofourdan@redhat.com> | 2021-02-16 09:37:46 +0100 |
commit | ab76272a7d2bff997985893c89147412a7360310 (patch) | |
tree | decf93ca39d069cabbdb45a6fee9ed12e245639c | |
parent | a4095162ca923992a8cfae6d0f09ff9f8144762a (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
-rw-r--r-- | hw/xwayland/xwayland-input.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/hw/xwayland/xwayland-input.c b/hw/xwayland/xwayland-input.c index c69636d7d..9529720a6 100644 --- a/hw/xwayland/xwayland-input.c +++ b/hw/xwayland/xwayland-input.c @@ -303,6 +303,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: |