From: Rémi Bernon rbernon@codeweavers.com
Instead of checking for monitor rect. --- dlls/winex11.drv/window.c | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-)
diff --git a/dlls/winex11.drv/window.c b/dlls/winex11.drv/window.c index ffe1710b734..a5cf126206f 100644 --- a/dlls/winex11.drv/window.c +++ b/dlls/winex11.drv/window.c @@ -376,7 +376,7 @@ static struct x11drv_win_data *alloc_win_data( Display *display, HWND hwnd ) * * Check if a given window should be managed */ -static BOOL is_window_managed( HWND hwnd, UINT swp_flags, const RECT *window_rect ) +static BOOL is_window_managed( HWND hwnd, UINT swp_flags, BOOL fullscreen ) { DWORD style, ex_style;
@@ -394,18 +394,10 @@ static BOOL is_window_managed( HWND hwnd, UINT swp_flags, const RECT *window_rec if (style & WS_THICKFRAME) return TRUE; if (style & WS_POPUP) { - HMONITOR hmon; - MONITORINFO mi; - /* popup with sysmenu == caption are managed */ if (style & WS_SYSMENU) return TRUE; /* full-screen popup windows are managed */ - hmon = NtUserMonitorFromWindow( hwnd, MONITOR_DEFAULTTOPRIMARY ); - mi.cbSize = sizeof( mi ); - NtUserGetMonitorInfo( hmon, &mi ); - if (window_rect->left <= mi.rcWork.left && window_rect->right >= mi.rcWork.right && - window_rect->top <= mi.rcWork.top && window_rect->bottom >= mi.rcWork.bottom) - return TRUE; + if (fullscreen) return TRUE; } /* application windows are managed */ ex_style = NtUserGetWindowLongW( hwnd, GWL_EXSTYLE ); @@ -2121,7 +2113,7 @@ static void create_whole_window( struct x11drv_win_data *data ) if (data->vis.visualid != default_visual.visualid) data->whole_colormap = XCreateColormap( data->display, root_window, data->vis.visual, AllocNone );
- data->managed = is_window_managed( data->hwnd, SWP_NOACTIVATE, &data->rects.window ); + data->managed = is_window_managed( data->hwnd, SWP_NOACTIVATE, data->is_fullscreen ); mask = get_window_attributes( data, &attr );
if (!(cx = data->rects.visible.right - data->rects.visible.left)) cx = 1; @@ -2944,7 +2936,7 @@ void X11DRV_WindowPosChanged( HWND hwnd, HWND insert_after, HWND owner_hint, UIN if (!(data = get_win_data( hwnd ))) return;
/* check if we need to switch the window to managed */ - if (!data->managed && data->whole_window && is_window_managed( hwnd, swp_flags, &new_rects->window )) + if (!data->managed && data->whole_window && is_window_managed( hwnd, swp_flags, fullscreen )) { UINT wm_state = data->desired_state.wm_state; TRACE( "making win %p/%lx managed\n", hwnd, data->whole_window );