From: Rémi Bernon rbernon@codeweavers.com
--- dlls/winex11.drv/event.c | 5 ++--- dlls/winex11.drv/window.c | 10 ++++++---- dlls/winex11.drv/x11drv.h | 1 + 3 files changed, 9 insertions(+), 7 deletions(-)
diff --git a/dlls/winex11.drv/event.c b/dlls/winex11.drv/event.c index 9271758090e..ea0fab4611e 100644 --- a/dlls/winex11.drv/event.c +++ b/dlls/winex11.drv/event.c @@ -1031,7 +1031,7 @@ static BOOL X11DRV_ConfigureNotify( HWND hwnd, XEvent *xev ) struct x11drv_win_data *data; RECT rect; POINT pos; - UINT flags, dpi; + UINT flags; HWND parent; BOOL root_coords; int cx, cy, x = event->x, y = event->y; @@ -1053,7 +1053,6 @@ static BOOL X11DRV_ConfigureNotify( HWND hwnd, XEvent *xev )
/* Get geometry */
- dpi = get_win_monitor_dpi( data->hwnd ); parent = NtUserGetAncestor( hwnd, GA_PARENT ); root_coords = event->send_event; /* synthetic events are always in root coords */
@@ -1106,7 +1105,7 @@ static BOOL X11DRV_ConfigureNotify( HWND hwnd, XEvent *xev ) (int)(data->rects.window.bottom - data->rects.window.top), cx, cy );
style = NtUserGetWindowLongW( data->hwnd, GWL_STYLE ); - if ((style & WS_CAPTION) == WS_CAPTION || !NtUserIsWindowRectFullScreen( &data->rects.visible, dpi )) + if ((style & WS_CAPTION) == WS_CAPTION || !data->is_fullscreen) { read_net_wm_states( event->display, data ); if ((data->net_wm_state & (1 << NET_WM_STATE_MAXIMIZED))) diff --git a/dlls/winex11.drv/window.c b/dlls/winex11.drv/window.c index 78f296fd7f3..87eafc2e68d 100644 --- a/dlls/winex11.drv/window.c +++ b/dlls/winex11.drv/window.c @@ -297,7 +297,7 @@ static inline BOOL is_window_resizable( struct x11drv_win_data *data, DWORD styl { if (style & WS_THICKFRAME) return TRUE; /* Metacity needs the window to be resizable to make it fullscreen */ - return NtUserIsWindowRectFullScreen( &data->rects.visible, get_win_monitor_dpi( data->hwnd ) ); + return data->is_fullscreen; }
/*********************************************************************** @@ -1103,7 +1103,7 @@ void update_net_wm_states( struct x11drv_win_data *data ) style = NtUserGetWindowLongW( data->hwnd, GWL_STYLE ); if (style & WS_MINIMIZE) new_state |= data->net_wm_state & ((1 << NET_WM_STATE_FULLSCREEN)|(1 << NET_WM_STATE_MAXIMIZED)); - if (NtUserIsWindowRectFullScreen( &data->rects.visible, get_win_monitor_dpi( data->hwnd ) )) + if (data->is_fullscreen) { if ((style & WS_MAXIMIZE) && (style & WS_CAPTION) == WS_CAPTION) new_state |= (1 << NET_WM_STATE_MAXIMIZED); @@ -2587,6 +2587,7 @@ void X11DRV_WindowPosChanged( HWND hwnd, HWND insert_after, UINT swp_flags, BOOL struct x11drv_win_data *data; UINT new_style = NtUserGetWindowLongW( hwnd, GWL_STYLE ); struct window_rects old_rects; + BOOL was_fullscreen; int event_type;
if (!(data = get_win_data( hwnd ))) return; @@ -2594,7 +2595,9 @@ void X11DRV_WindowPosChanged( HWND hwnd, HWND insert_after, UINT swp_flags, BOOL thread_data = x11drv_thread_data();
old_rects = data->rects; + was_fullscreen = data->is_fullscreen; data->rects = *new_rects; + data->is_fullscreen = fullscreen;
TRACE( "win %p/%lx new_rects %s style %08x flags %08x\n", hwnd, data->whole_window, debugstr_window_rects(new_rects), new_style, swp_flags ); @@ -2633,8 +2636,7 @@ void X11DRV_WindowPosChanged( HWND hwnd, HWND insert_after, UINT swp_flags, BOOL { release_win_data( data ); unmap_window( hwnd ); - if (NtUserIsWindowRectFullScreen( &old_rects.window, get_win_monitor_dpi( hwnd ) )) - NtUserClipCursor( NULL ); + if (was_fullscreen) NtUserClipCursor( NULL ); if (!(data = get_win_data( hwnd ))) return; } } diff --git a/dlls/winex11.drv/x11drv.h b/dlls/winex11.drv/x11drv.h index 6d328778bb6..edb47f550e7 100644 --- a/dlls/winex11.drv/x11drv.h +++ b/dlls/winex11.drv/x11drv.h @@ -612,6 +612,7 @@ struct x11drv_win_data UINT skip_taskbar : 1; /* does window should be deleted from taskbar */ UINT add_taskbar : 1; /* does window should be added to taskbar regardless of style */ UINT net_wm_fullscreen_monitors_set : 1; /* is _NET_WM_FULLSCREEN_MONITORS set */ + UINT is_fullscreen : 1; /* is the window visible rect fullscreen */ int wm_state; /* current value of the WM_STATE property */ DWORD net_wm_state; /* bit mask of active x11drv_net_wm_state values */ Window embedder; /* window id of embedder */