From 47c54c4ae7f235780a55ddf670503db4afc11055 Mon Sep 17 00:00:00 2001 From: Henri Verbeet Date: Fri, 28 Sep 2012 01:06:52 +0200 Subject: [PATCH] winex11: Fullscreen windows are never maximized. Some window managers incorrectly set maximized state on fullscreen windows. --- dlls/winex11.drv/event.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/dlls/winex11.drv/event.c b/dlls/winex11.drv/event.c index 514f0d47a4..d9c932eac9 100644 --- a/dlls/winex11.drv/event.c +++ b/dlls/winex11.drv/event.c @@ -998,6 +998,7 @@ void X11DRV_ConfigureNotify( HWND hwnd, XEvent *xev ) HWND parent; BOOL root_coords; int cx, cy, x = event->x, y = event->y; + DWORD style; if (!hwnd) return; if (!(data = get_win_data( hwnd ))) return; @@ -1061,9 +1062,10 @@ void X11DRV_ConfigureNotify( HWND hwnd, XEvent *xev ) hwnd, data->window_rect.right - data->window_rect.left, data->window_rect.bottom - data->window_rect.top, cx, cy ); - if (is_net_wm_state_maximized( event->display, data )) + style = GetWindowLongW( data->hwnd, GWL_STYLE ); + if ((style & WS_CAPTION) == WS_CAPTION && is_net_wm_state_maximized( event->display, data )) { - if (!IsZoomed( data->hwnd )) + if (!(style & WS_MAXIMIZE)) { TRACE( "win %p/%lx is maximized\n", data->hwnd, data->whole_window ); release_win_data( data ); @@ -1073,7 +1075,7 @@ void X11DRV_ConfigureNotify( HWND hwnd, XEvent *xev ) } else { - if (IsZoomed( data->hwnd )) + if (style & WS_MAXIMIZE) { TRACE( "window %p/%lx is no longer maximized\n", data->hwnd, data->whole_window ); release_win_data( data ); @@ -1198,7 +1200,7 @@ static void handle_wm_state_notify( HWND hwnd, XPropertyEvent *event, BOOL updat if (data->iconic && data->wm_state == NormalState) /* restore window */ { data->iconic = FALSE; - if (is_net_wm_state_maximized( event->display, data )) + if ((style & WS_CAPTION) == WS_CAPTION && is_net_wm_state_maximized( event->display, data )) { if ((style & WS_MAXIMIZEBOX) && !(style & WS_DISABLED)) { -- 2.32.0.93.g670b81a890