winewayland.drv: Ensure outputs can access xdg information robustly.

Add outputs to the output_list on creation (instead of when they are
first configured), so they are detected and "upgraded" with xdg
information even if the compositor advertises the zxdg_output_manager
global after the wl_outputs themselves.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=55788
This commit is contained in:
Alexandros Frantzis 2023-10-14 17:39:01 +03:00 committed by Alexandre Julliard
parent 8cfcc211b8
commit 1bc84c177d

View file

@ -165,9 +165,6 @@ static void wayland_output_done(struct wayland_output *output)
output->current.logical_h = output->pending.logical_h;
}
if (wl_list_empty(&output->link))
wl_list_insert(process_wayland.output_list.prev, &output->link);
output->pending_flags = 0;
pthread_mutex_unlock(&process_wayland.output_mutex);
@ -334,6 +331,10 @@ BOOL wayland_output_create(uint32_t id, uint32_t version)
if (process_wayland.zxdg_output_manager_v1)
wayland_output_use_xdg_extension(output);
pthread_mutex_lock(&process_wayland.output_mutex);
wl_list_insert(process_wayland.output_list.prev, &output->link);
pthread_mutex_unlock(&process_wayland.output_mutex);
return TRUE;
err: