From 62c08e0194fb5bfc6c43cd483e477de93c812e85 Mon Sep 17 00:00:00 2001 From: Jan Zerebecki Date: Sat, 9 Aug 2008 14:52:36 +0200 Subject: [PATCH] winex11.drv: Make more windows managed and managed the default. This pach is disable by default by an #ifndef DEFAULTMANAGED . Based on a patch from http://wiki.winehq.org/InterestingPatches?action=AttachFile&do=get&target=WM_managed.diff by Vitaliy Margolen. --- dlls/winex11.drv/window.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/dlls/winex11.drv/window.c b/dlls/winex11.drv/window.c index 31437655cec..8c1ca0de193 100644 --- a/dlls/winex11.drv/window.c +++ b/dlls/winex11.drv/window.c @@ -96,6 +96,11 @@ static BOOL is_window_managed( HWND hwnd, UINT swp_flags, const RECT *window_rec /* child windows are not managed */ style = GetWindowLongW( hwnd, GWL_STYLE ); if ((style & (WS_CHILD|WS_POPUP)) == WS_CHILD) return FALSE; + #ifndef DEFAULTMANAGED + /* set to 1 to enable default managed instead of default not managed */ + #define DEFAULTMANAGED 0 + #endif + if(!DEFAULTMANAGED){ /* activated windows are managed */ if (!(swp_flags & (SWP_NOACTIVATE|SWP_HIDEWINDOW))) return TRUE; if (hwnd == GetActiveWindow()) return TRUE; @@ -103,6 +108,7 @@ static BOOL is_window_managed( HWND hwnd, UINT swp_flags, const RECT *window_rec if ((style & WS_CAPTION) == WS_CAPTION) return TRUE; /* windows with thick frame are managed */ if (style & WS_THICKFRAME) return TRUE; + } if (style & WS_POPUP) { /* popup with sysmenu == caption are managed */ @@ -111,12 +117,22 @@ static BOOL is_window_managed( HWND hwnd, UINT swp_flags, const RECT *window_rec if (window_rect->left <= 0 && window_rect->right >= screen_width && window_rect->top <= 0 && window_rect->bottom >= screen_height) return TRUE; + if(DEFAULTMANAGED) { + /* all other popups are not managed */ + return FALSE; + } } /* application windows are managed */ ex_style = GetWindowLongW( hwnd, GWL_EXSTYLE ); if (ex_style & WS_EX_APPWINDOW) return TRUE; + if(DEFAULTMANAGED) { + /* default: managed */ + return TRUE; + } else { /* default: not managed */ return FALSE; + } + } -- 2.11.4.GIT