Which got broken by the delaying mechanism in !8079.
From: Rémi Bernon rbernon@codeweavers.com
--- dlls/winex11.drv/window.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/dlls/winex11.drv/window.c b/dlls/winex11.drv/window.c index f271e55200a..23d97d51b08 100644 --- a/dlls/winex11.drv/window.c +++ b/dlls/winex11.drv/window.c @@ -949,7 +949,7 @@ static void window_set_mwm_hints( struct x11drv_win_data *data, const MwmHints * const MwmHints *old_hints = &data->pending_state.mwm_hints;
data->desired_state.mwm_hints = *new_hints; - if (!data->whole_window || !data->managed) return; /* no window or not managed, nothing to update */ + if (!data->whole_window || !data->managed || data->embedded) return; /* no window or not managed, nothing to update */ if (!memcmp( old_hints, new_hints, sizeof(*new_hints) )) return; /* hints are the same, nothing to update */
if (window_needs_mwm_hints_change_delay( data )) @@ -1269,7 +1269,7 @@ static void window_set_net_wm_state( struct x11drv_win_data *data, UINT new_stat
new_state &= x11drv_thread_data()->net_wm_state_mask; data->desired_state.net_wm_state = new_state; - if (!data->whole_window || !data->managed) return; /* no window or not managed, nothing to update */ + if (!data->whole_window || !data->managed || data->embedded) return; /* no window or not managed, nothing to update */ if (data->wm_state_serial) return; /* another WM_STATE update is pending, wait for it to complete */ /* we ignore and override previous _NET_WM_STATE update requests */ if (old_state == new_state) return; /* states are the same, nothing to update */
From: Rémi Bernon rbernon@codeweavers.com
Storing impossible desired rect always trigger the delayed config preserve check in window_configure_notify with embedded windows. --- dlls/winex11.drv/window.c | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-)
diff --git a/dlls/winex11.drv/window.c b/dlls/winex11.drv/window.c index 23d97d51b08..24c1d6731f3 100644 --- a/dlls/winex11.drv/window.c +++ b/dlls/winex11.drv/window.c @@ -1344,6 +1344,18 @@ static void window_set_config( struct x11drv_win_data *data, RECT rect, BOOL abo XWindowChanges changes; RECT *new_rect = ▭
+ /* resizing a managed maximized window is not allowed */ + if ((style & WS_MAXIMIZE) && data->managed) + { + new_rect->right = new_rect->left + old_rect->right - old_rect->left; + new_rect->bottom = new_rect->top + old_rect->bottom - old_rect->top; + } + /* only the size is allowed to change for the desktop window or systray docked windows */ + if (data->whole_window == root_window || data->embedded) + { + OffsetRect( new_rect, old_rect->left - new_rect->left, old_rect->top - new_rect->top ); + } + data->desired_state.rect = *new_rect; data->desired_state.above = above; if (!data->whole_window) return; /* no window, nothing to update */ @@ -1354,10 +1366,8 @@ static void window_set_config( struct x11drv_win_data *data, RECT rect, BOOL abo return; }
- /* resizing a managed maximized window is not allowed */ - if ((old_rect->right - old_rect->left != new_rect->right - new_rect->left || - old_rect->bottom - old_rect->top != new_rect->bottom - new_rect->top) && - (!(style & WS_MAXIMIZE) || !data->managed)) + if (old_rect->right - old_rect->left != new_rect->right - new_rect->left || + old_rect->bottom - old_rect->top != new_rect->bottom - new_rect->top) { changes.width = new_rect->right - new_rect->left; changes.height = new_rect->bottom - new_rect->top; @@ -1373,9 +1383,7 @@ static void window_set_config( struct x11drv_win_data *data, RECT rect, BOOL abo new_rect->bottom = new_rect->top + old_rect->bottom - old_rect->top; }
- /* only the size is allowed to change for the desktop window or systray docked windows */ - if ((old_rect->left != new_rect->left || old_rect->top != new_rect->top) && - (data->whole_window != root_window && !data->embedded)) + if (old_rect->left != new_rect->left || old_rect->top != new_rect->top) { POINT pt = virtual_screen_to_root( new_rect->left, new_rect->top ); changes.x = pt.x;
From: Rémi Bernon rbernon@codeweavers.com
Embedders aren't ICCCM compliant window managers and they sometimes don't even reply to config requests. Delaying is also now unnecessary as we don't request the problematic properties with embedded windows and as we keep requesting the desired configs if necessary. --- dlls/winex11.drv/window.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/dlls/winex11.drv/window.c b/dlls/winex11.drv/window.c index 24c1d6731f3..cda9afa7d77 100644 --- a/dlls/winex11.drv/window.c +++ b/dlls/winex11.drv/window.c @@ -937,6 +937,7 @@ static BOOL window_needs_net_wm_state_change_delay( struct x11drv_win_data *data
static BOOL window_needs_config_change_delay( struct x11drv_win_data *data ) { + if (!data->managed || data->embedded) return FALSE; /* window is not managed or is embedded, safe to make changes */ if (data->pending_state.wm_state == WithdrawnState) return FALSE; /* window is unmapped, should be safe to make any change */ if (data->configure_serial) return TRUE; /* another config update is pending, wait for it to complete */ /* delay any config request when a _NET_WM_STATE or _MOTIF_WM_HINTS change which might trigger a ConfigureNotify is in flight */ @@ -1360,7 +1361,7 @@ static void window_set_config( struct x11drv_win_data *data, RECT rect, BOOL abo data->desired_state.above = above; if (!data->whole_window) return; /* no window, nothing to update */ if (EqualRect( old_rect, new_rect ) && (old_above || !above)) return; /* rects are the same, no need to be raised, nothing to update */ - if (data->managed && window_needs_config_change_delay( data )) + if (window_needs_config_change_delay( data )) { TRACE( "window %p/%lx is updating _NET_WM_STATE/_MOTIF_WM_HINTS, delaying request\n", data->hwnd, data->whole_window ); return;