Rémi Bernon (@rbernon) commented about dlls/winewayland.drv/window.c:
- /* We want to keep the Wayland surface if we have a client area subsurface. */
- if (data->wayland_surface)
- {
BOOL has_client;
pthread_mutex_lock(&data->wayland_surface->mutex);
has_client = !!data->wayland_surface->client;
pthread_mutex_unlock(&data->wayland_surface->mutex);
if (has_client) return TRUE;
- }
- return FALSE;
+}
+static void wayland_win_data_update_wayland_state(struct wayland_win_data *data);
+static void wayland_win_data_update_wayland_surface(struct wayland_win_data *data, UINT flags)
This is doing too many different things and is getting quite complicated. It would be better to have different helpers to create different kind of surfaces, and move the destruction to the callers (which would save the need for UWS_FORCE_CREATE).