win32 only fix for 82534. focus goes wonky after minimizing a window. r=bryner, sr=jag
git-svn-id: svn://10.0.0.236/trunk@123675 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -450,6 +450,25 @@ 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<nsIDOMWindowInternal> domWindow;
|
||||
eventWindow->ConvertWebShellToDOMWindow(webShell, getter_AddRefs(domWindow));
|
||||
if (domWindow) {
|
||||
nsCOMPtr<nsPIDOMWindow> privateDOMWindow = do_QueryInterface(domWindow);
|
||||
if(privateDOMWindow) {
|
||||
nsCOMPtr<nsIFocusController> focusController;
|
||||
privateDOMWindow->GetRootFocusController(getter_AddRefs(focusController));
|
||||
if (focusController)
|
||||
focusController->RewindFocusState();
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
break;
|
||||
}
|
||||
case NS_OS_TOOLBAR: {
|
||||
|
||||
Reference in New Issue
Block a user