b=793501 set gFocusWindow on fallback instead of early, which interfered with container window focus change detection in SetFocus() r=roc

--HG--
extra : transplant_source : %AD%07%A7%EB/%D6M%F3i%21%85d%8D%E8%92K%D6%1D%1F8
This commit is contained in:
Karl Tomlinson 2012-10-23 11:31:53 +13:00
Родитель ea0fe16a39
Коммит 06d7fccaeb
1 изменённых файлов: 11 добавлений и 6 удалений

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

@ -2794,15 +2794,20 @@ nsWindow::OnContainerFocusInEvent(GtkWidget *aWidget, GdkEventFocus *aEvent)
return;
}
// This is not usually the correct window for dispatching key events,
// but the focus manager will call SetFocus to set the correct window if
// keyboard input will be accepted. Setting a non-NULL value here
// prevents OnButtonPressEvent() from dispatching an activation
// notification if the widget is already active.
gFocusWindow = this;
// If keyboard input will be accepted, the focus manager will call
// SetFocus to set the correct window.
gFocusWindow = nullptr;
DispatchActivateEvent();
if (!gFocusWindow) {
// We don't really have a window for dispatching key events, but
// setting a non-NULL value here prevents OnButtonPressEvent() from
// dispatching an activation notification if the widget is already
// active.
gFocusWindow = this;
}
LOGFOCUS(("Events sent from focus in event [%p]\n", (void *)this));
}