Rémi Bernon (@rbernon) commented about dlls/winex11.drv/desktop.c:
{ static RECT old_virtual_rect;
- RECT primary_rect, virtual_rect; + RECT virtual_rect = NtUserGetVirtualScreenRect(); HWND hwnd = NtUserGetDesktopWindow(); - INT width, height; - - virtual_rect = NtUserGetVirtualScreenRect(); - primary_rect = NtUserGetPrimaryMonitorRect(); - width = primary_rect.right; - height = primary_rect.bottom; + LONG width = virtual_rect.right - virtual_rect.left, height = virtual_rect.bottom - virtual_rect.top;
INT width = virtual_rect.right - virtual_rect.left, height = virtual_rect.bottom - virtual_rect.top;
And keep %d in the format string. In general you should avoid LONG/DWORD on the unix side because they are going to need a different format string on 32bit vs 64bit. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/4823#note_57223