From: Rémi Bernon <rbernon@codeweavers.com> Otherwise we might race with other host window events coming in and attempting to change the win32 state as well. --- dlls/win32u/window.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/dlls/win32u/window.c b/dlls/win32u/window.c index 4bceb90fcd2..15465894a29 100644 --- a/dlls/win32u/window.c +++ b/dlls/win32u/window.c @@ -1592,6 +1592,7 @@ LONG_PTR WINAPI NtUserSetWindowLongPtr( HWND hwnd, INT offset, LONG_PTR newval, BOOL set_window_pixel_format( HWND hwnd, int format, BOOL internal ) { WND *win = get_win_ptr( hwnd ); + BOOL changed = FALSE; if (!win || win == WND_DESKTOP || win == WND_OTHER_PROCESS) { @@ -1600,10 +1601,10 @@ BOOL set_window_pixel_format( HWND hwnd, int format, BOOL internal ) return FALSE; } if (!internal) win->pixel_format = format; - if (format) win->clip_clients = TRUE; + if (format && !win->clip_clients) changed = win->clip_clients = TRUE; release_win_ptr( win ); - update_window_state( hwnd ); + if (changed) update_window_state( hwnd ); return TRUE; } -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/10139