winex11: Fullscreen windows are never maximized.

Some window managers incorrectly set maximized state on fullscreen windows.
This commit is contained in:
Henri Verbeet 2012-09-28 01:06:52 +02:00 committed by Alexandre Julliard
parent 5087cb192c
commit 47c54c4ae7
1 changed files with 6 additions and 4 deletions

View File

@ -998,6 +998,7 @@ void X11DRV_ConfigureNotify( HWND hwnd, XEvent *xev )
HWND parent; HWND parent;
BOOL root_coords; BOOL root_coords;
int cx, cy, x = event->x, y = event->y; int cx, cy, x = event->x, y = event->y;
DWORD style;
if (!hwnd) return; if (!hwnd) return;
if (!(data = get_win_data( 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, hwnd, data->window_rect.right - data->window_rect.left,
data->window_rect.bottom - data->window_rect.top, cx, cy ); 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 ); TRACE( "win %p/%lx is maximized\n", data->hwnd, data->whole_window );
release_win_data( data ); release_win_data( data );
@ -1073,7 +1075,7 @@ void X11DRV_ConfigureNotify( HWND hwnd, XEvent *xev )
} }
else else
{ {
if (IsZoomed( data->hwnd )) if (style & WS_MAXIMIZE)
{ {
TRACE( "window %p/%lx is no longer maximized\n", data->hwnd, data->whole_window ); TRACE( "window %p/%lx is no longer maximized\n", data->hwnd, data->whole_window );
release_win_data( data ); 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 */ if (data->iconic && data->wm_state == NormalState) /* restore window */
{ {
data->iconic = FALSE; 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)) if ((style & WS_MAXIMIZEBOX) && !(style & WS_DISABLED))
{ {