From: Rémi Bernon rbernon@codeweavers.com
The state change might have applied the new config already, or might have triggered some new requests which would override the new config.
It's also necessary to call again to compute the visible rect from the window rect after taking the new state into account. Minimized windows have a different window / visible rect offset than normal windows for instance.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=57577 --- dlls/win32u/message.c | 4 ++++ 1 file changed, 4 insertions(+)
diff --git a/dlls/win32u/message.c b/dlls/win32u/message.c index d8da5a0f48f..2f1e14c82c8 100644 --- a/dlls/win32u/message.c +++ b/dlls/win32u/message.c @@ -2136,6 +2136,10 @@ static LRESULT handle_internal_message( HWND hwnd, UINT msg, WPARAM wparam, LPAR { if (LOWORD(state_cmd) == SC_RESTORE && HIWORD(state_cmd)) NtUserSetActiveWindow( hwnd ); send_message( hwnd, WM_SYSCOMMAND, LOWORD(state_cmd), 0 ); + + /* state change might have changed the window config already, check again */ + user_driver->pGetWindowStateUpdates( hwnd, &state_cmd, &config_cmd, &window_rect ); + if (state_cmd) WARN( "window %p state needs another update, ignoring\n", hwnd ); } if (config_cmd) {