From: Rémi Bernon rbernon@codeweavers.com
--- 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 6e834457620..97c8becb2ac 100644 --- a/dlls/winex11.drv/window.c +++ b/dlls/winex11.drv/window.c @@ -247,7 +247,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, const RECT *window_rect, UINT dpi ) { DWORD style, ex_style;
@@ -265,18 +265,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 (NtUserIsWindowRectFullScreen(window_rect, dpi)) return TRUE; } /* application windows are managed */ ex_style = NtUserGetWindowLongW( hwnd, GWL_EXSTYLE ); @@ -1738,7 +1730,7 @@ static void create_whole_window( struct x11drv_win_data *data ) HRGN win_rgn; POINT pos;
- if (!data->managed && is_window_managed( data->hwnd, SWP_NOACTIVATE, &data->window_rect )) + if (!data->managed && is_window_managed( data->hwnd, SWP_NOACTIVATE, &data->window_rect, get_win_monitor_dpi( data->hwnd ) )) { TRACE( "making win %p/%lx managed\n", data->hwnd, data->whole_window ); data->managed = TRUE; @@ -2580,7 +2572,7 @@ BOOL X11DRV_WindowPosChanging( HWND hwnd, UINT swp_flags, BOOL shaped, struct wi data->shaped = shaped;
/* check if we need to switch the window to managed */ - if (!data->managed && data->whole_window && is_window_managed( hwnd, swp_flags, &rects->window )) + if (!data->managed && data->whole_window && is_window_managed( hwnd, swp_flags, &rects->window, get_win_monitor_dpi( hwnd ) )) { TRACE( "making win %p/%lx managed\n", hwnd, data->whole_window ); release_win_data( data );