Vincent Povirk : winex11.drv: Don' t change net_wm maximized state for minimized windows.

Alexandre Julliard julliard at wine.codeweavers.com
Mon Jul 20 14:20:48 CDT 2015


Module: wine
Branch: master
Commit: ce409c01d51c20386edab73c31930ceaa82c9e83
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=ce409c01d51c20386edab73c31930ceaa82c9e83

Author: Vincent Povirk <vincent at codeweavers.com>
Date:   Fri Jul 17 15:48:24 2015 -0500

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 50c3290..7651590 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)




More information about the wine-cvs mailing list