wsi/x11: Make sure wsi_x11_connection::is_xwayland is always initialized
authorMichel Dänzer <mdaenzer@redhat.com>
Fri, 8 Jan 2021 17:45:33 +0000 (18:45 +0100)
committerMarge Bot <eric+marge@anholt.net>
Mon, 11 Jan 2021 13:58:06 +0000 (13:58 +0000)
We wouldn't initialize it if the X server didn't support the RANDR
extension (though that's unlikely these days).

Fixes: b5268d532a01 "wsi/x11: Detect Xwayland"
Reviewed-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Tested-by: Dieter Nützel <Dieter@nuetzel-hh.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8393>

src/vulkan/wsi/wsi_common_x11.c

index 3b6884d..124377d 100644 (file)
@@ -236,9 +236,9 @@ wsi_x11_connection_create(struct wsi_device *wsi_dev,
 #endif
 
    if (randr_reply && randr_reply->present != 0)
-   {
       wsi_conn->is_xwayland = wsi_x11_detect_xwayland(conn);
-   }
+   else
+      wsi_conn->is_xwayland = false;
 
    wsi_conn->has_dri3_modifiers = has_dri3_v1_2 && has_present_v1_2;
    wsi_conn->is_proprietary_x11 = false;