From 2e317e0242852f6476ecfeb364c6b823969c59e2 Mon Sep 17 00:00:00 2001 From: Olivier Fourdan Date: Mon, 4 Dec 2023 16:43:53 +0100 Subject: [PATCH] xwayland: Check for fullscreen on output name change MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit At startup, the names of the Wayland outputs are not yet known, therefore we cannot rely on those when running fullscreen rootful. Make sure to check the fullscreen state once the Wayland output name changes. Signed-off-by: Olivier Fourdan Acked-by: Michel Dänzer --- hw/xwayland/xwayland-output.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/hw/xwayland/xwayland-output.c b/hw/xwayland/xwayland-output.c index 8f063169e..25559d0e1 100644 --- a/hw/xwayland/xwayland-output.c +++ b/hw/xwayland/xwayland-output.c @@ -681,6 +681,8 @@ apply_output_change(struct xwl_output *xwl_output) static void xwl_output_set_name(struct xwl_output *xwl_output, const char *name) { + struct xwl_screen *xwl_screen = xwl_output->xwl_screen; + if (xwl_output->randr_output == NULL) return; /* rootful */ @@ -692,6 +694,9 @@ xwl_output_set_name(struct xwl_output *xwl_output, const char *name) snprintf(xwl_output->randr_output->name, MAX_OUTPUT_NAME, "%s", name); xwl_output->randr_output->nameLength = strlen(xwl_output->randr_output->name); + + if (xwl_screen->output_name && strcmp(name, xwl_screen->output_name) == 0) + maybe_update_fullscreen_state(xwl_output); } static void