From ce409c01d51c20386edab73c31930ceaa82c9e83 Mon Sep 17 00:00:00 2001 From: Vincent Povirk Date: Fri, 17 Jul 2015 15:48:24 -0500 Subject: [PATCH] winex11.drv: Don't change net_wm maximized state for minimized windows. In Win32, minimized windows are generally not considered maximized, but restoring a minimized window that had been maximized returns it to the maximized state. In X11, at least with some window managers (I tested metacity and gnome shell), the maximized state is meaningful for minimized windows. If we remove the net_wm maximized state from windows we minimize, they will still be unmaximized when the WM restores them. --- dlls/winex11.drv/window.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlls/winex11.drv/window.c b/dlls/winex11.drv/window.c index 50c32906d58..76515907552 100644 --- a/dlls/winex11.drv/window.c +++ b/dlls/winex11.drv/window.c @@ -976,7 +976,7 @@ void update_net_wm_states( struct x11drv_win_data *data ) style = GetWindowLongW( data->hwnd, GWL_STYLE ); if (style & WS_MINIMIZE) - new_state |= data->net_wm_state & (1 << NET_WM_STATE_FULLSCREEN); + new_state |= data->net_wm_state & ((1 << NET_WM_STATE_FULLSCREEN)|(1 << NET_WM_STATE_MAXIMIZED)); if (is_window_rect_fullscreen( &data->whole_rect )) { if ((style & WS_MAXIMIZE) && (style & WS_CAPTION) == WS_CAPTION)