http://bugs.winehq.org/show_bug.cgi?id=60037 Bug ID: 60037 Summary: Regression: fixed resolution 4:3 fullscreen apps on Wayland have their content offset and present some undefined padding area Product: Wine Version: 11.13 Hardware: x86-64 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: winewayland Assignee: wine-bugs@list.winehq.org Reporter: salyigergo94@gmail.com Target Milestone: --- Distribution: --- Some if not all (old, mostly DX8 era) Windows apps which can only render a fullscreen, fixed resolution and different-from-monitor aspect ratio window show problems for me on Wayland with Wine 11.13. For example a fixed 4:3 640x480 or 800x600 fullscreen game running on Wine with Wayland on a 16:9 1920x1080 monitor. These fullscreen 4:3 apps on a 16:9 monitor now have their content offset to the right and an undefined, not-necessarily-black-cleared (sometimes black or white) padding area / bar getting presented on the left of their fullscreen window. This is consistent for me across all Sway, Hyprland and KDE plasma Wayland compositors and with using both stock Wine and DXVK overrides for DirectX DLLs. I did some testing with a build from current master branch (e8781e7c8d07, 2026-07-17). Screenshots of 2 affected games - Touhou 6 running a 640x480 window and Knights and Merchants running a 800x600 window - on Sway in a 1920x1080 monitor will be attched. Sway centers the different aspect ratio fullscreen window and pads the left and right with a black bar (this is normal). The bug is that white bar that is starting from there inside the content area. Then the content being offset to the right I think overflows the centered viewport extends up to the right edge of the screen. 2 more screenshots with the windows popped to floating state will also be attached. The logs with WINEDEBUG="fixme+all,trace+win,trace+waylanddrv" will also be attached (I cut 30k lines from the middle of one log). This is a regression in 11.13, I bisected: Last good commit: eb1cf9f1bcac First bad commit: b868cd31d6b5, 2026-07-01, win32u: Move client surface rect computation out of the drivers The following part is speculative. Noted this part of the logs: 0134:trace:win:client_surface_update_locked ... virtual_rect (0,0)-(640,480), monitor_rect (240,0)-(1680,1080) 0134:trace:waylanddrv:wayland_surface_reconfigure_client ... rect=(240,0)-(1680,1080) I think the problematic padding area is introduced here: dlls/win32u/window.c:326 get_client_surface_rects() { /* ... */ OffsetRect( monitor_rect, monitor_rects.client.left - monitor_rects.visible.left, monitor_rects.client.top - monitor_rects.visible.top ); /* ... */ } **Commenting out that OffsetRect call from get_client_surface_rects fixes the problem for me.** After patching out the OffsetRect call, the windows of these apps look normal, without the offset and the undefined (white or black) padding bar. And the logs now show: 0134:trace:win:client_surface_update_locked ... virtual_rect (0,0)-(640,480), monitor_rect (0,0)-(1440,1080) 0134:trace:waylanddrv:wayland_surface_reconfigure_client ... rect=(0,0)-(1440,1080) But I arguably don't understand what that code does, so I'm just guessing about some things here: 1) if Wine wants to pad a fullscreen different-from-monitor aspect ratio Windows window to the aspect ratio of the monitor, then 1a) it should pad it to the monitor aspect ratio on both sides not just one 1b) and it should ensure that the padding bars are cleared opaque black and not left undefined 2) if Wine does not want to pad these windows but only scale them preserving the different-from-monitor aspect ratio, then 2a) either should not offset its content (monitor_rect ?) 2b) or should crop off the offset with a (missing?) wp_viewport_set_source 2c) or less likely crop off the offset in wl_surface_attach(buf, x, y) with non-zero x or y (?) There are just guesses, this gets way too deep for me here (I touched some other Wayland client code before but not Wine code). I hope some of it is helpful. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.