xwayland: Check for fullscreen on output name change

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 <ofourdan@redhat.com>
Acked-by: Michel Dänzer <mdaenzer@redhat.com>
This commit is contained in:
Olivier Fourdan 2023-12-04 16:43:53 +01:00 committed by Olivier Fourdan
parent 01e31f5d95
commit 2e317e0242

View File

@ -681,6 +681,8 @@ apply_output_change(struct xwl_output *xwl_output)
static void static void
xwl_output_set_name(struct xwl_output *xwl_output, const char *name) 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) if (xwl_output->randr_output == NULL)
return; /* rootful */ 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); snprintf(xwl_output->randr_output->name, MAX_OUTPUT_NAME, "%s", name);
xwl_output->randr_output->nameLength = strlen(xwl_output->randr_output->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 static void