Bug 108787 -- unable to type in Open Web Location dialog when it first appears. r=saari, sr=blizzard.

This commit is contained in:
bryner%netscape.com 2001-12-11 05:34:32 +00:00
Родитель 5be3015148
Коммит 4332f20cb5
2 изменённых файлов: 12 добавлений и 6 удалений

Просмотреть файл

@ -1211,8 +1211,6 @@ GdkCursor *nsWindow::GtkCreateCursor(nsCursor aCursorType)
NS_IMETHODIMP
nsWindow::SetFocus(PRBool aRaise)
{
PRBool sendActivate = gJustGotActivate;
gJustGotActivate = PR_FALSE;
#ifdef DEBUG_FOCUS
printf("nsWindow::SetFocus %p\n", NS_STATIC_CAST(void *, this));
#endif /* DEBUG_FOCUS */
@ -1285,9 +1283,6 @@ nsWindow::SetFocus(PRBool aRaise)
#endif // USE_XIM
DispatchSetFocusEvent();
if (sendActivate) {
DispatchActivateEvent();
}
#ifdef DEBUG_FOCUS
printf("Returning:\n");
@ -1330,6 +1325,12 @@ void nsWindow::DispatchSetFocusEvent(void)
NS_ADDREF_THIS();
DispatchFocus(event);
if (gJustGotActivate) {
gJustGotActivate = PR_FALSE;
DispatchActivateEvent();
}
NS_RELEASE_THIS();
}
@ -1436,6 +1437,11 @@ void nsWindow::HandleMozAreaFocusIn(void)
// window. embedding handles activate semantics for us.
if (mIsToplevel)
gJustGotActivate = PR_TRUE;
#ifdef USE_XIM
IMESetFocusWindow();
#endif // USE_XIM
DispatchSetFocusEvent();
}

Просмотреть файл

@ -489,7 +489,7 @@ nsWebShellWindow::HandleEvent(nsGUIEvent *aEvent)
printf("nsWebShellWindow::NS_ACTIVATE\n");
#endif
// Sucky platform specific code to get around event dispatch ordering
#if defined(WIN32) || defined(XP_OS2)
#if defined(WIN32) || defined(XP_OS2) || defined (MOZ_WIDGET_GTK)
nsCOMPtr<nsIDOMWindowInternal> domWindow;
eventWindow->ConvertWebShellToDOMWindow(webShell, getter_AddRefs(domWindow));