winex11.drv: Use the monitor work area to decide whether a window should be made managed
Dmitry Timoshkov
dmitry at codeweavers.com
Mon Oct 6 22:14:52 CDT 2008
This patch fixes a regression reported in the bug 15507.
---
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 */
--
1.6.0.2
More information about the wine-patches
mailing list