Bug 162917 (carried over from bugscape 19001) - initial focus problems with sheets. Patch by sfraser, r=sdagley, sr=bryner.

This commit is contained in:
bryner%netscape.com 2002-08-15 21:31:47 +00:00
Родитель e882554c2d
Коммит 72043058b6
1 изменённых файлов: 5 добавлений и 1 удалений

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

@ -1344,10 +1344,14 @@ if (KeyDown(0x39)) // press [caps lock] to start the profile
PRBool active;
mTopLevelWidget->IsActive(&active);
nsWindow* focusedWidget = mTopLevelWidget;
if(!active) {
if (!active) {
gEventDispatchHandler.SetActivated(focusedWidget);
mTopLevelWidget->SetIsActive(PR_TRUE);
}
else if (!gEventDispatchHandler.GetActive()) {
NS_ASSERTION(0, "We think we're active, but there is no active widget!");
gEventDispatchHandler.SetActivated(focusedWidget);
}
// Twiddle menu bars
nsIMenuBar* menuBar = focusedWidget->GetMenuBar();