From: chenjiangyi <chenjiangyi(a)uniontech.com> When the window is restoring from the maximized state, its size should be adjustable. Some window managers may reject change the _NET_WM_STATE property when the window is maximized but its size is restricted to normal size by XSetWMNormalHints Signed-off-by: chenjiangyi <chenjiangyi(a)uniontech.com> --- dlls/winex11.drv/window.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/dlls/winex11.drv/window.c b/dlls/winex11.drv/window.c index 615fb9da086..7f0199502fc 100644 --- a/dlls/winex11.drv/window.c +++ b/dlls/winex11.drv/window.c @@ -417,6 +417,13 @@ static BOOL is_window_managed( HWND hwnd, UINT swp_flags, BOOL fullscreen ) static inline BOOL is_window_resizable( struct x11drv_win_data *data, DWORD style ) { if (style & WS_THICKFRAME) return TRUE; + /* When the window is restoring from the maximized state, its size should be adjustable. + Some window managers may reject change the _NET_WM_STATE property when the window is + maximized but its size is restricted to normal size by XSetWMNormalHints. + */ + if (!(style & (WS_MINIMIZE | WS_MAXIMIZE)) && (data->pending_state.wm_state == NormalState) + && (data->current_state.net_wm_state & (1 << NET_WM_STATE_MAXIMIZED)) && !data->configure_serial) + return TRUE; /* Metacity needs the window to be resizable to make it fullscreen */ return data->is_fullscreen; } -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/7552