Rémi Bernon (@rbernon) commented about dlls/winewayland.drv/window_surface.c:
wl_display_flush(process_wayland.wl_display); NtGdiSetRectRgn(shm_buffer->damage_region, 0, 0, 0, 0);
- /* Update the latest window buffer for the wayland surface. Note that we
* only care whether the buffer contains the latest window contents,
* it's irrelevant if it was actually committed or not. */
- wayland_shm_buffer_ref(shm_buffer);
- if (wws->wayland_surface->latest_window_buffer)
wayland_shm_buffer_unref(wws->wayland_surface->latest_window_buffer);
- wws->wayland_surface->latest_window_buffer = shm_buffer;
This is also a bit unusual, I'd rather do:
```suggestion:-3+0 if (wws->wayland_surface->latest_window_buffer) wayland_shm_buffer_unref(wws->wayland_surface->latest_window_buffer); wayland_shm_buffer_ref((wws->wayland_surface->latest_window_buffer = shm_buffer)); ```
Or on separate lines if you prefer, but adding the ref count just next to the assignment.