From 0fede76cc387252347d6e098e59e9708ed623140 Mon Sep 17 00:00:00 2001 From: Olivier Fourdan Date: Mon, 11 Dec 2023 16:49:16 +0100 Subject: [PATCH] xwayland: Do not update the outputs when rootful MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When running rootful, we do not need to apply the output changes, these are there just to track the names and show up as disconnected in XRandR. Signed-off-by: Olivier Fourdan Acked-by: Michel Dänzer --- hw/xwayland/xwayland-output.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/hw/xwayland/xwayland-output.c b/hw/xwayland/xwayland-output.c index 60a997d76..6699bdb8f 100644 --- a/hw/xwayland/xwayland-output.c +++ b/hw/xwayland/xwayland-output.c @@ -698,8 +698,12 @@ static void output_handle_done(void *data, struct wl_output *wl_output) { struct xwl_output *xwl_output = data; + struct xwl_screen *xwl_screen = xwl_output->xwl_screen; xwl_output->wl_output_done = TRUE; + if (xwl_screen->fixed_output) + return; + /* Apply the changes from wl_output only if both "done" events are received, * if xdg-output is not supported or if xdg-output version is high enough. */ @@ -761,8 +765,13 @@ static void xdg_output_handle_done(void *data, struct zxdg_output_v1 *xdg_output) { struct xwl_output *xwl_output = data; + struct xwl_screen *xwl_screen = xwl_output->xwl_screen; xwl_output->xdg_output_done = TRUE; + + if (xwl_screen->fixed_output) + return; + if (xwl_output->wl_output_done && zxdg_output_v1_get_version(xdg_output) < 3) apply_output_change(xwl_output);