From: Twaik Yont <9674930+twaik@users.noreply.github.com> NtUserGetAncestor( hwnd, GA_PARENT ) returns 0 for the desktop window (it has no parent), and is_window_visible(0) returns FALSE. So SWP_NOREDRAW gets forced on every SetWindowPos() for the desktop, making set_window_pos() skip the exposed-region/erase computation on resize (e.g. from WM_DISPLAYCHANGE), leaving stale contents on screen. Signed-off-by: Twaik Yont <9674930+twaik@users.noreply.github.com> --- dlls/win32u/window.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlls/win32u/window.c b/dlls/win32u/window.c index 1ecdca6c7d8..f4693bd2367 100644 --- a/dlls/win32u/window.c +++ b/dlls/win32u/window.c @@ -3756,7 +3756,7 @@ static BOOL fixup_swp_flags( WINDOWPOS *winpos, const RECT *old_window_rect, int else if (winpos->cy > 32767) winpos->cy = 32767; parent = NtUserGetAncestor( winpos->hwnd, GA_PARENT ); - if (!is_window_visible( parent )) winpos->flags |= SWP_NOREDRAW; + if (parent && !is_window_visible( parent )) winpos->flags |= SWP_NOREDRAW; if (win->dwStyle & WS_VISIBLE) winpos->flags &= ~SWP_SHOWWINDOW; else -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/10712