Module: wine Branch: master Commit: 15c820611824bd67300547627a72f2d85f44afde URL: http://source.winehq.org/git/wine.git/?a=commit;h=15c820611824bd67300547627a...
Author: Dmitry Timoshkov dmitry@codeweavers.com Date: Tue Oct 7 12:14:52 2008 +0900
winex11.drv: Use the monitor work area to decide whether a window should be made managed.
---
dlls/winex11.drv/window.c | 10 ++++++++-- 1 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/dlls/winex11.drv/window.c b/dlls/winex11.drv/window.c index b9b2059..0ca0836 100644 --- a/dlls/winex11.drv/window.c +++ b/dlls/winex11.drv/window.c @@ -105,11 +105,17 @@ 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 */ - if (window_rect->left <= 0 && window_rect->right >= screen_width && - window_rect->top <= 0 && window_rect->bottom >= screen_height) + hmon = MonitorFromWindow( hwnd, MONITOR_DEFAULTTOPRIMARY ); + mi.cbSize = sizeof( mi ); + GetMonitorInfoW( 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; } /* application windows are managed */