winex11.drv: Resizing the window is allowed When the window is being restored from its maximized state.
When the window is restoring from the maximized state, its size should be adjustable. Some window managers may not correctly send the PropertyNotify event for 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@uniontech.com
From: chenjiangyi chenjiangyi@uniontech.com
When the window is restoring from the maximized state, its size should be adjustable. Some window managers may not correctly send the PropertyNotify event for 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@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..a4833071188 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 not correctly send the PropertyNotify event for 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; }