Fixed popup menus opened at the wrong position (mostly noticed in Installer) with a horrible hack which I can't see how to avoid
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15941 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -19,6 +19,7 @@
|
||||
#include <Screen.h>
|
||||
#include <Window.h>
|
||||
|
||||
#include <BMCPrivate.h>
|
||||
#include <MenuPrivate.h>
|
||||
#include <MenuWindow.h>
|
||||
|
||||
@@ -1429,7 +1430,11 @@ BMenu::CalcFrame(BPoint where, bool *scrollOn)
|
||||
BMenu *superMenu = Supermenu();
|
||||
BMenuItem *superItem = Superitem();
|
||||
|
||||
if (superMenu == NULL || superItem == NULL) {
|
||||
// TODO: Horrible hack:
|
||||
// When added to a BMenuField, a BPopUpMenu is the child of
|
||||
// a _BMCItem_ inside a _BMCMenuBar_ to "fake" the menu hierarchy
|
||||
if (superMenu == NULL || superItem == NULL
|
||||
|| dynamic_cast<_BMCItem_ *>(superItem) != NULL) {
|
||||
// just move the window on screen
|
||||
|
||||
if (frame.bottom > screenFrame.bottom)
|
||||
|
||||
Reference in New Issue
Block a user