mirror of
https://gitlab.winehq.org/wine/wine.git
synced 2024-11-19 17:06:04 -07:00
winex11: Wait for pending ConfigureNotify before updating the client state.
This commit is contained in:
parent
8bbc193178
commit
03738c3f22
Notes:
Alexandre Julliard
2024-11-18 23:18:45 +01:00
Approved-by: Alexandre Julliard (@julliard) Merge-Request: https://gitlab.winehq.org/wine/wine/merge_requests/6569
2 changed files with 10 additions and 2 deletions
|
@ -1104,7 +1104,7 @@ static BOOL X11DRV_ConfigureNotify( HWND hwnd, XEvent *xev )
|
||||||
struct x11drv_win_data *data;
|
struct x11drv_win_data *data;
|
||||||
RECT rect;
|
RECT rect;
|
||||||
POINT pos = {event->x, event->y};
|
POINT pos = {event->x, event->y};
|
||||||
UINT config_cmd;
|
UINT config_cmd, state_cmd;
|
||||||
|
|
||||||
if (!hwnd) return FALSE;
|
if (!hwnd) return FALSE;
|
||||||
if (!(data = get_win_data( hwnd ))) return FALSE;
|
if (!(data = get_win_data( hwnd ))) return FALSE;
|
||||||
|
@ -1123,17 +1123,24 @@ static BOOL X11DRV_ConfigureNotify( HWND hwnd, XEvent *xev )
|
||||||
SetRect( &rect, pos.x, pos.y, pos.x + event->width, pos.y + event->height );
|
SetRect( &rect, pos.x, pos.y, pos.x + event->width, pos.y + event->height );
|
||||||
window_configure_notify( data, event->serial, &rect );
|
window_configure_notify( data, event->serial, &rect );
|
||||||
|
|
||||||
|
state_cmd = window_update_client_state( data );
|
||||||
config_cmd = window_update_client_config( data );
|
config_cmd = window_update_client_config( data );
|
||||||
rect = window_rect_from_visible( &data->rects, data->current_state.rect );
|
rect = window_rect_from_visible( &data->rects, data->current_state.rect );
|
||||||
release_win_data( data );
|
release_win_data( data );
|
||||||
|
|
||||||
|
if (state_cmd)
|
||||||
|
{
|
||||||
|
if (LOWORD(state_cmd) == SC_RESTORE && HIWORD(state_cmd)) NtUserSetActiveWindow( hwnd );
|
||||||
|
send_message( hwnd, WM_SYSCOMMAND, LOWORD(state_cmd), 0 );
|
||||||
|
}
|
||||||
|
|
||||||
if (config_cmd)
|
if (config_cmd)
|
||||||
{
|
{
|
||||||
if (LOWORD(config_cmd) == SC_MOVE) NtUserSetRawWindowPos( hwnd, rect, HIWORD(config_cmd), FALSE );
|
if (LOWORD(config_cmd) == SC_MOVE) NtUserSetRawWindowPos( hwnd, rect, HIWORD(config_cmd), FALSE );
|
||||||
else send_message( hwnd, WM_SYSCOMMAND, LOWORD(config_cmd), 0 );
|
else send_message( hwnd, WM_SYSCOMMAND, LOWORD(config_cmd), 0 );
|
||||||
}
|
}
|
||||||
|
|
||||||
return !!config_cmd;
|
return config_cmd || state_cmd;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1505,6 +1505,7 @@ UINT window_update_client_state( struct x11drv_win_data *data )
|
||||||
|
|
||||||
if (data->wm_state_serial) return 0; /* another WM_STATE update is pending, wait for it to complete */
|
if (data->wm_state_serial) return 0; /* another WM_STATE update is pending, wait for it to complete */
|
||||||
if (data->net_wm_state_serial) return 0; /* another _NET_WM_STATE update is pending, wait for it to complete */
|
if (data->net_wm_state_serial) return 0; /* another _NET_WM_STATE update is pending, wait for it to complete */
|
||||||
|
if (data->configure_serial) return 0; /* another config update is pending, wait for it to complete */
|
||||||
|
|
||||||
if (data->iconic && data->current_state.wm_state == NormalState) /* restore window */
|
if (data->iconic && data->current_state.wm_state == NormalState) /* restore window */
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue