Mesa (master): wsi/x11: Make sure wsi_x11_connection::is_xwayland is always initialized

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Mon Jan 11 14:09:53 UTC 2021


Module: Mesa
Branch: master
Commit: 42d15184d6f66e7118d9468cbaa91e64ffd37fbb
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=42d15184d6f66e7118d9468cbaa91e64ffd37fbb

Author: Michel Dänzer <mdaenzer at redhat.com>
Date:   Fri Jan  8 18:45:33 2021 +0100

wsi/x11: Make sure wsi_x11_connection::is_xwayland is always initialized

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 at redhat.com>
Reviewed-by: Bas Nieuwenhuizen <bas at basnieuwenhuizen.nl>
Tested-by: Dieter Nützel <Dieter at nuetzel-hh.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8393>

---

 src/vulkan/wsi/wsi_common_x11.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/vulkan/wsi/wsi_common_x11.c b/src/vulkan/wsi/wsi_common_x11.c
index 3b6884d37ab..124377dd6cb 100644
--- a/src/vulkan/wsi/wsi_common_x11.c
+++ b/src/vulkan/wsi/wsi_common_x11.c
@@ -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;



More information about the mesa-commit mailing list