Rémi Bernon (@rbernon) commented about dlls/winewayland.drv/window_surface.c:
- shm_buffer = wayland_buffer_queue_acquire_buffer(wws->wayland_buffer_queue); if (!shm_buffer) {
ERR("failed to create Wayland SHM buffer, returning\n");
}ERR("failed to acquire Wayland SHM buffer, returning\n"); goto done;
wl_buffer_add_listener(shm_buffer->wl_buffer, &buffer_listener, shm_buffer);
memcpy(shm_buffer->map_data, wws->bits, shm_buffer->map_size);
pthread_mutex_lock(&wws->wayland_surface->mutex); if (wws->wayland_surface->current_serial) { wayland_surface_attach_shm(wws->wayland_surface, shm_buffer);
Then changing `wayland_surface_attach_shm` to increase the reference count inside, instead of sinking the reference, which is rather unusual in Wine,