From: Rémi Bernon rbernon@codeweavers.com
So a delayed update might still be applied from the desired state if we only requested a partial update, for instance only changed position.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=57465 --- dlls/winex11.drv/window.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/dlls/winex11.drv/window.c b/dlls/winex11.drv/window.c index dee8bec18d0..0052dcc8439 100644 --- a/dlls/winex11.drv/window.c +++ b/dlls/winex11.drv/window.c @@ -1324,7 +1324,12 @@ static void window_set_config( struct x11drv_win_data *data, const RECT *new_rec mask |= CWStackMode; }
- data->pending_state.rect = *new_rect; + if (mask & (CWX | CWY)) OffsetRect( &data->pending_state.rect, new_rect->left - old_rect->left, new_rect->top - old_rect->top ); + if (mask & (CWWidth | CWHeight)) + { + data->pending_state.rect.right = data->pending_state.rect.left + new_rect->right - new_rect->left; + data->pending_state.rect.bottom = data->pending_state.rect.top + new_rect->bottom - new_rect->top; + } data->configure_serial = NextRequest( data->display ); 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 );
From: Rémi Bernon rbernon@codeweavers.com
Checking the style isn't accurate, and we should check the pending state if window is or enters maximized / fullscreen, and the current state for windows exiting maximized / fullscreen, for which wait until the state update is complete before requesting a new size.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=57465 --- dlls/winex11.drv/window.c | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-)
diff --git a/dlls/winex11.drv/window.c b/dlls/winex11.drv/window.c index 0052dcc8439..5a216744fab 100644 --- a/dlls/winex11.drv/window.c +++ b/dlls/winex11.drv/window.c @@ -1277,28 +1277,17 @@ static void window_set_net_wm_state( struct x11drv_win_data *data, UINT new_stat static void window_set_config( struct x11drv_win_data *data, const RECT *new_rect, BOOL above ) { static const UINT fullscreen_mask = (1 << NET_WM_STATE_MAXIMIZED) | (1 << NET_WM_STATE_FULLSCREEN); - UINT style = NtUserGetWindowLongW( data->hwnd, GWL_STYLE ), mask = 0; + BOOL is_maximized = (data->pending_state.net_wm_state & fullscreen_mask) || (data->current_state.net_wm_state & fullscreen_mask); const RECT *old_rect = &data->pending_state.rect; XWindowChanges changes; + UINT mask = 0;
data->desired_state.rect = *new_rect; if (!data->whole_window) return; /* no window, nothing to update */ if (EqualRect( old_rect, new_rect )) return; /* rects are the same, nothing to update */
- if (data->pending_state.wm_state == NormalState && data->net_wm_state_serial && - !(data->pending_state.net_wm_state & fullscreen_mask) && - (data->current_state.net_wm_state & fullscreen_mask)) - { - /* Some window managers are sending a ConfigureNotify event with the fullscreen size when - * exiting a fullscreen window, with a serial that we cannot predict. Handling that event - * will override the Win32 window size and make the window fullscreen again. - */ - WARN( "window %p/%lx is exiting maximize/fullscreen, delaying request\n", data->hwnd, data->whole_window ); - return; - } - /* resizing a managed maximized window is not allowed */ - if (!(style & WS_MAXIMIZE) || !data->managed) + if (!is_maximized || !data->managed) { changes.width = new_rect->right - new_rect->left; changes.height = new_rect->bottom - new_rect->top;
This merge request was closed by Rémi Bernon.