I encountered a problem with flickering of a maximized window. I was able to determine that the issue arises from an extra call to NtUserSetWindowPos with incorrect rects. When SetWindowRgn is called, it triggers a call to NtUserSetWindowPos with SWP_NOSIZE | SWP_NOMOVE. Later, execution reaches the window_update_client_config function, where swp_flags are formed without SWP_NOSIZE | SWP_NOMOVE. These flags are formed because the rects in winex11 and win32u diverge: Win32u rect: (-4,-4)-(1924,1175) X11 desired rect: (0,0)-(1920,1171) X11 current rect: (0,0)-(1920,1171) In win32u, the rects are used after offset handling for the maximized window in the adjust_window_rect function. The formed swp_flags are passed to NtUserSetWindowPos, which causes the flickering. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/10915