https://bugs.winehq.org/show_bug.cgi?id=57199
Bug ID: 57199 Summary: window_surface not always destroyed Product: Wine Version: unspecified Hardware: x86-64 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: win32u Assignee: wine-bugs@winehq.org Reporter: alexandros.frantzis@collabora.com Distribution: ---
Created attachment 77093 --> https://bugs.winehq.org/attachment.cgi?id=77093 DPI unaware app with winex11 not destroying window surfaces
With the latest Wine master (tested 03d985369dc9afe943ee3072478a2567b3fe4077, but haven't run a bisection, so can't say when this was introduced), there are scenarios where the previous window_surface for a HWND is not destroyed when a new one is created for that same HWND (e.g., resizing). This creates memory leaks which have different effects depending on the driver (e.g., winewayland eventually runs out of SHM memory).
I am seeing this issue with applications that are not DPI aware when the system dpi != 96. I am attaching two logs, one for winex11 (under xwayland) and one for winewayland, from the same application (Crayon Physics Deluxe) while interactively resizing the window, in a prefix with dpi=192 configured (matching the 2x monitor scale). Note the absence of any window surface destruction calls in the logs, whereas multiple new window surfaces (for the same window) are being created during the resize.
I have slightly changed the {WAYLAND,X11DRV}_CreateWindowSurface TRACE() so that it prints `*surface` (instead of `surface`) in the logs.