Reverted that last change, as it was really a bad idea afterall (as Axel pointed out)
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12784 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
db4227c6ac
commit
063446f455
@ -1053,10 +1053,9 @@ BMenu::InitData(BMessage *data)
|
||||
bool
|
||||
BMenu::_show(bool selectFirstItem)
|
||||
{
|
||||
BWindow *menuWindow = MenuWindow();
|
||||
|
||||
menuWindow->Lock();
|
||||
menuWindow->ChildAt(0)->AddChild(this);
|
||||
// Menu windows get the BMenu's handler name
|
||||
fCachedMenuWindow = new BMenuWindow(Name());
|
||||
fCachedMenuWindow->ChildAt(0)->AddChild(this);
|
||||
|
||||
// We're doing this here because ConvertToScreen() needs:
|
||||
// 1. The BView to be attached (see the above line).
|
||||
@ -1066,8 +1065,7 @@ BMenu::_show(bool selectFirstItem)
|
||||
|
||||
UpdateWindowViewSize();
|
||||
|
||||
menuWindow->Unlock();
|
||||
menuWindow->Show();
|
||||
fCachedMenuWindow->Show();
|
||||
|
||||
return true;
|
||||
}
|
||||
@ -1079,8 +1077,8 @@ BMenu::_hide()
|
||||
if (fCachedMenuWindow != NULL) {
|
||||
fCachedMenuWindow->Lock();
|
||||
fCachedMenuWindow->ChildAt(0)->RemoveChild(this);
|
||||
fCachedMenuWindow->Hide();
|
||||
fCachedMenuWindow->Unlock();
|
||||
fCachedMenuWindow->Quit();
|
||||
fCachedMenuWindow = NULL;
|
||||
}
|
||||
|
||||
}
|
||||
@ -1434,12 +1432,6 @@ BMenu::OverSubmenu(BMenuItem *item, BPoint loc)
|
||||
BMenuWindow *
|
||||
BMenu::MenuWindow()
|
||||
{
|
||||
if (fCachedMenuWindow == NULL) {
|
||||
// Menu windows get the BMenu's handler name
|
||||
fCachedMenuWindow = new BMenuWindow(Name());
|
||||
UpdateWindowViewSize();
|
||||
}
|
||||
|
||||
return fCachedMenuWindow;
|
||||
}
|
||||
|
||||
@ -1646,9 +1638,11 @@ void
|
||||
BMenu::UpdateWindowViewSize(bool upWind)
|
||||
{
|
||||
ASSERT(fCachedMenuWindow != NULL);
|
||||
if (fCachedMenuWindow != NULL) {
|
||||
fCachedMenuWindow->ResizeTo(Bounds().Width() + 2, Bounds().Height() + 2);
|
||||
fCachedMenuWindow->MoveTo(ScreenLocation());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
bool
|
||||
|
Loading…
Reference in New Issue
Block a user