New focus stuff for getting focus to the content area of the apprunner window.

git-svn-id: svn://10.0.0.236/trunk@38125 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
joki%netscape.com
1999-07-02 19:43:26 +00:00
parent e5b828c0ce
commit bfbeb5f588
3 changed files with 61 additions and 7 deletions

View File

@@ -463,6 +463,21 @@ nsWebShellWindow::HandleEvent(nsGUIEvent *aEvent)
break;
}
case NS_GOTFOCUS: {
void* data;
aEvent->widget->GetClientData(data);
if (data) {
nsCOMPtr<nsIWebShell> contentShell;
((nsWebShellWindow *)data)->GetContentWebShell(getter_AddRefs(contentShell));
if (contentShell) {
nsCOMPtr<nsIDOMWindow> domWindow;
if (NS_SUCCEEDED(((nsWebShellWindow *)data)->
ConvertWebShellToDOMWindow(contentShell, getter_AddRefs(domWindow)))) {
domWindow->Focus();
}
}
}
}
default:
break;