From: Rémi Bernon rbernon@codeweavers.com
--- dlls/winewayland.drv/window.c | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-)
diff --git a/dlls/winewayland.drv/window.c b/dlls/winewayland.drv/window.c index e8d6b770496..639526486c7 100644 --- a/dlls/winewayland.drv/window.c +++ b/dlls/winewayland.drv/window.c @@ -372,7 +372,7 @@ static inline HWND get_active_window(void) * * 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;
@@ -388,18 +388,10 @@ static BOOL is_window_managed(HWND hwnd, UINT swp_flags, const RECT *window_rect 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); @@ -454,7 +446,7 @@ void WAYLAND_WindowPosChanged(HWND hwnd, HWND insert_after, UINT swp_flags, cons /* Get the managed state with win_data unlocked, as is_window_managed * may need to query win_data information about other HWNDs and thus * acquire the lock itself internally. */ - managed = is_window_managed(hwnd, swp_flags, &new_rects->window); + managed = is_window_managed(hwnd, swp_flags, &new_rects->window, get_win_monitor_dpi(hwnd));
if (!(data = wayland_win_data_get(hwnd))) return;