Fix for bug 261074: OnFocus fires twice when window restored

Patch by Oliver Yeoh
r=emaijala
sr=roc


git-svn-id: svn://10.0.0.236/trunk@220593 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
emaijala%kolumbus.fi
2007-02-20 19:45:17 +00:00
parent 34613c4dad
commit 2f14a7397e
5 changed files with 42 additions and 91 deletions

View File

@@ -354,21 +354,6 @@ nsWebShellWindow::HandleEvent(nsGUIEvent *aEvent)
// the state and pass the event on to the OS. The day is coming
// when we'll handle the event here, and the return result will
// then need to be different.
#ifdef XP_WIN
// This is a nasty hack to get around the fact that win32 sends the kill focus
// event in a different sequence than the deactivate depending on if you're
// minimizing the window vs. just clicking in a different window to cause
// the deactivation. Bug #82534
if(modeEvent->mSizeMode == nsSizeMode_Minimized) {
nsCOMPtr<nsPIDOMWindow> privateDOMWindow = do_GetInterface(docShell);
if(privateDOMWindow) {
nsIFocusController *focusController =
privateDOMWindow->GetRootFocusController();
if (focusController)
focusController->RewindFocusState();
}
}
#endif
break;
}
case NS_OS_TOOLBAR: {