Rémi Bernon (@rbernon) commented about dlls/winewayland.drv/wayland_surface.c:
+ /* the subsurface rect has changed */ + if (surface->role == WAYLAND_SURFACE_ROLE_SUBSURFACE) + { + surface->processing.serial = 1; + surface->processing.processed = TRUE; + } + } + + TRACE("hwnd=%p scale %lf\n", hwnd, scale); + } + + wayland_win_data_release(data); + } + + if (updated) NtUserExposeWindowSurface(hwnd, 0, NULL, 0); +} Lets return early for uninteresting cases instead of nesting the interesting ones:
```suggestion:-40+0 void wp_fractional_scale_handle_scale(void* user_data, struct wp_fractional_scale_v1 *fractional_scale_v1, uint32_t scale_fixed) { double scale = scale_fixed / 120.0; struct wayland_win_data *data; struct wayland_client_surface *client; struct wayland_surface *surface; HWND hwnd = user_data; TRACE("hwnd=%p scale %lf\n", hwnd, scale); if (!(data = wayland_win_data_get(hwnd))) return; if (!(surface = data->wayland_surface) || scale == surface->window.scale) { wayland_win_data_release(data); return; } surface->window.scale = scale; /* reattach the client surface as its rect has changed */ if ((client = data->client_surface)) wayland_client_surface_attach(client, client->toplevel); /* the subsurface rect has changed */ if (surface->role == WAYLAND_SURFACE_ROLE_SUBSURFACE) { surface->processing.serial = 1; surface->processing.processed = TRUE; } wayland_win_data_release(data); NtUserExposeWindowSurface(hwnd, 0, NULL, 0); } ``` -- https://gitlab.winehq.org/wine/wine/-/merge_requests/11101#note_142943