Small fix: didn't make sure the previous focus was still part of the window.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15045 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -478,7 +478,7 @@ BMenuBar::RestoreFocus()
|
|||||||
if (BPrivate::gDefaultTokens.GetToken(fPrevFocusToken, B_HANDLER_TOKEN,
|
if (BPrivate::gDefaultTokens.GetToken(fPrevFocusToken, B_HANDLER_TOKEN,
|
||||||
(void **)&handler, NULL) == B_OK) {
|
(void **)&handler, NULL) == B_OK) {
|
||||||
BView *view = dynamic_cast<BView *>(handler);
|
BView *view = dynamic_cast<BView *>(handler);
|
||||||
if (view != NULL)
|
if (view != NULL && view->Window() == window)
|
||||||
view->MakeFocus();
|
view->MakeFocus();
|
||||||
}
|
}
|
||||||
fPrevFocusToken = -1;
|
fPrevFocusToken = -1;
|
||||||
@@ -486,6 +486,7 @@ BMenuBar::RestoreFocus()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
BMenuBar::InitData(menu_layout layout)
|
BMenuBar::InitData(menu_layout layout)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user