xserver: Branch 'xwayland-21.1' - 3 commits

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Wed Feb 17 11:57:11 UTC 2021


 dix/devices.c                |    3 +++
 hw/xwayland/xwayland-input.c |    4 ++++
 meson.build                  |    3 +--
 3 files changed, 8 insertions(+), 2 deletions(-)

New commits:
commit fdc61c5a3cc2637a52928c8e2fd4d50118c7ffea
Author: Michel Dänzer <mdaenzer at redhat.com>
Date:   Tue Feb 16 15:46:04 2021 +0100

    meson: Simplify build_glamor logic
    
    Don't need the separate glamor_option variable anymore.
    
    Fixes: 274d54d1c387 "meson: Build Xwayland unconditionally"

diff --git a/meson.build b/meson.build
index a1a8a571d..f52659c1d 100644
--- a/meson.build
+++ b/meson.build
@@ -146,7 +146,7 @@ else
     default_font_path = dfp
 endif
 
-glamor_option = get_option('glamor')
+build_glamor = get_option('glamor')
 
 with_dtrace = get_option('dtrace')
 if with_dtrace
@@ -154,7 +154,6 @@ if with_dtrace
 endif
 
 build_xwayland = true
-build_glamor = glamor_option != 'false'
 
 xwayland_path = get_option('xwayland-path')
 if (xwayland_path == '')
commit 22a3dedac3bebef6c4e12b52bb1f1d15a434345d
Author: Olivier Fourdan <ofourdan at redhat.com>
Date:   Tue Feb 16 15:33:09 2021 +0100

    dix: Guard against non-existing PtrFeedbackPtr
    
    Trying to change the pointer control settings on a device without
    PtrFeedbackPtr would be a bug and a crash in the Xserver.
    
    Guard against that case by returning early with a BadImplementation
    error, that might kill the X11 client but the Xserver would survive.
    
    Signed-off-by: Olivier Fourdan <ofourdan at redhat.com>
    Reviewed-by: Peter Hutterer <peter.hutterer at who-t.net>
    Related: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1137
    (imported from commit dee2bb033e78e2f4aae7f5708c3d4fc74a9957de)

diff --git a/dix/devices.c b/dix/devices.c
index 0ab9f37c2..85d899c20 100644
--- a/dix/devices.c
+++ b/dix/devices.c
@@ -2257,6 +2257,9 @@ ProcChangePointerControl(ClientPtr client)
     REQUEST(xChangePointerControlReq);
     REQUEST_SIZE_MATCH(xChangePointerControlReq);
 
+    /* If the device has no PtrFeedbackPtr, the xserver has a bug */
+    BUG_RETURN_VAL (!mouse->ptrfeed, BadImplementation);
+
     ctrl = mouse->ptrfeed->ctrl;
     if ((stuff->doAccel != xTrue) && (stuff->doAccel != xFalse)) {
         client->errorValue = stuff->doAccel;
commit b16dbd878d5fefb3855d65437bcd698e5dfec129
Author: Olivier Fourdan <ofourdan at redhat.com>
Date:   Tue Feb 16 15:32:47 2021 +0100

    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 at redhat.com>
    Reviewed-by: Peter Hutterer <peter.hutterer at who-t.net>
    Closes: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1137
    (cherry picked from commit ab76272a7d2bff997985893c89147412a7360310)

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:


More information about the xorg-commit mailing list