From 6afe5b36ec5cb4db3b39dbfb44b90a96919759ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A9=20van=20Geldorp?= Date: Thu, 15 Jan 2004 20:59:35 +0000 Subject: [PATCH] Patch by Filip Navara. - Work on correctly activating the MDI child windows. svn path=/trunk/; revision=7657 --- reactos/lib/user32/windows/nonclient.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/reactos/lib/user32/windows/nonclient.c b/reactos/lib/user32/windows/nonclient.c index 77afc656437..57f6ecc8284 100644 --- a/reactos/lib/user32/windows/nonclient.c +++ b/reactos/lib/user32/windows/nonclient.c @@ -280,7 +280,16 @@ DefWndNCPaint(HWND hWnd, HRGN hRgn) } ExStyle = GetWindowLongW(hWnd, GWL_EXSTYLE); - Active = (GetForegroundWindow() == hWnd); + if (ExStyle & WS_EX_MDICHILD) + { + Active = IsChild(GetForegroundWindow(), hWnd); + if (Active) + Active = (hWnd == (HWND)SendMessageW(GetParent(hWnd), WM_MDIGETACTIVE, 0, 0)); + } + else + { + Active = (GetForegroundWindow() == hWnd); + } GetWindowRect(hWnd, &WindowRect); GetClientRect(hWnd, &ClientRect);