winex11: Avoid requesting unnecessary window config changes.

This commit is contained in:
Rémi Bernon 2024-10-17 16:39:30 +02:00 committed by Alexandre Julliard
parent 7ac35f13cb
commit 199274d420
Notes: Alexandre Julliard 2024-11-13 22:30:56 +01:00
Approved-by: Alexandre Julliard (@julliard)
Merge-Request: https://gitlab.winehq.org/wine/wine/merge_requests/6809

View file

@ -1271,9 +1271,11 @@ 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 )
{
UINT style = NtUserGetWindowLongW( data->hwnd, GWL_STYLE ), mask = 0;
const RECT *old_rect = &data->pending_state.rect;
XWindowChanges changes;
if (!data->whole_window) return; /* no window, nothing to update */
if (EqualRect( old_rect, new_rect )) return; /* rects are the same, nothing to update */
/* resizing a managed maximized window is not allowed */
if (!(style & WS_MAXIMIZE) || !data->managed)