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.
From: Rémi Bernon rbernon@codeweavers.com
--- dlls/winex11.drv/window.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/dlls/winex11.drv/window.c b/dlls/winex11.drv/window.c index bf415f19cb9..1d43c4edbdb 100644 --- a/dlls/winex11.drv/window.c +++ b/dlls/winex11.drv/window.c @@ -1622,8 +1622,6 @@ BOOL X11DRV_GetWindowStateUpdates( HWND hwnd, UINT *state_cmd, UINT *config_cmd, { struct x11drv_win_data *data;
- TRACE( "hwnd %p, state_cmd %p, config_cmd %p, rect %p\n", hwnd, state_cmd, config_cmd, rect ); - if (!(data = get_win_data( hwnd ))) return FALSE;
*state_cmd = window_update_client_state( data ); @@ -1632,7 +1630,7 @@ BOOL X11DRV_GetWindowStateUpdates( HWND hwnd, UINT *state_cmd, UINT *config_cmd,
release_win_data( data );
- TRACE( "returning state_cmd %#x, config_cmd %#x, rect %s\n", *state_cmd, *config_cmd, wine_dbgstr_rect(rect) ); + TRACE( "hwnd %p, returning state_cmd %#x, config_cmd %#x, rect %s\n", hwnd, *state_cmd, *config_cmd, wine_dbgstr_rect(rect) ); return *state_cmd || *config_cmd; }
From: Rémi Bernon rbernon@codeweavers.com
--- dlls/winex11.drv/window.c | 3 +++ 1 file changed, 3 insertions(+)
diff --git a/dlls/winex11.drv/window.c b/dlls/winex11.drv/window.c index 1d43c4edbdb..8426fb9ac3c 100644 --- a/dlls/winex11.drv/window.c +++ b/dlls/winex11.drv/window.c @@ -1340,6 +1340,9 @@ static void window_set_config( struct x11drv_win_data *data, const RECT *new_rec TRACE( "window %p/%lx, requesting config %s above %u, serial %lu\n", data->hwnd, data->whole_window, wine_dbgstr_rect(new_rect), above, data->configure_serial ); XReconfigureWMWindow( data->display, data->whole_window, data->vis.screen, mask, &changes ); + + /* don't wait for ConfigureNotify if only stack mode is requested */ + if (mask == CWStackMode) data->configure_serial = 0; }
/***********************************************************************
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) {