Module: wine
Branch: master
Commit: 1bc84c177d15aac42f3a2756a153cccbeaeb1578
URL: https://gitlab.winehq.org/wine/wine/-/commit/1bc84c177d15aac42f3a2756a153cc…
Author: Alexandros Frantzis <alexandros.frantzis(a)collabora.com>
Date: Sat Oct 14 17:39:01 2023 +0300
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
---
dlls/winewayland.drv/wayland_output.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/dlls/winewayland.drv/wayland_output.c b/dlls/winewayland.drv/wayland_output.c
index 4b2cb0505be..268b4593fd8 100644
--- a/dlls/winewayland.drv/wayland_output.c
+++ b/dlls/winewayland.drv/wayland_output.c
@@ -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: