From 99ffbb8d7698e7d23967f8a9505b9fdf7b5435b2 Mon Sep 17 00:00:00 2001 From: "emaijala%kolumbus.fi" Date: Wed, 29 Aug 2007 07:01:15 +0000 Subject: [PATCH] Part of the backout of bug 261074 that was missed in the previous backout at 2007-06-17. git-svn-id: svn://10.0.0.236/trunk@233292 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/widget/src/windows/nsWindow.cpp | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/mozilla/widget/src/windows/nsWindow.cpp b/mozilla/widget/src/windows/nsWindow.cpp index e8f8f1507ce..6100e0672dd 100644 --- a/mozilla/widget/src/windows/nsWindow.cpp +++ b/mozilla/widget/src/windows/nsWindow.cpp @@ -4661,16 +4661,12 @@ PRBool nsWindow::ProcessMessage(UINT msg, WPARAM wParam, LPARAM lParam, LRESULT #endif case WM_SETFOCUS: - { - nsWindow* topWindow = GetNSWindowPtr(::GetAncestor(mWnd, GA_ROOT)); - - result = DispatchFocus(NS_GOTFOCUS, PR_TRUE); - - if ((HWND)wParam == NULL || - (topWindow && topWindow->mWnd != ::GetAncestor((HWND)wParam, GA_ROOT))) { - result = DispatchFocus(NS_ACTIVATE, PR_TRUE); - } - } + result = DispatchFocus(NS_GOTFOCUS, PR_TRUE); + if (gJustGotActivate) { + gJustGotActivate = PR_FALSE; + gJustGotDeactivate = PR_FALSE; + result = DispatchFocus(NS_ACTIVATE, PR_TRUE); + } #ifdef ACCESSIBILITY if (nsWindow::gIsAccessibilityOn) {