More hacks to BWindow's mousedown handler, to fix some problems with menus. Fixes bug 610 among other things. Note: I don't like this code so much, but apparently BeOS handles it in a similar way. I accept suggestions on how to improve this.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17606 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -909,12 +909,14 @@ FrameMoved(origin);
|
||||
|
||||
case B_MOUSE_DOWN:
|
||||
{
|
||||
// Close an eventually opened menu.
|
||||
if (BMenu *menu = dynamic_cast<BMenu *>(fFocus)) {
|
||||
BView *view = dynamic_cast<BView *>(target);
|
||||
|
||||
// Close an eventually opened menu, unless the target is the menu itself
|
||||
BMenu *menu = dynamic_cast<BMenu *>(fFocus);
|
||||
if (menu != NULL && menu != view)
|
||||
menu->QuitTracking();
|
||||
}
|
||||
|
||||
if (BView *view = dynamic_cast<BView *>(target)) {
|
||||
|
||||
if (view != NULL) {
|
||||
BPoint where;
|
||||
msg->FindPoint("be:view_where", &where);
|
||||
view->MouseDown(where);
|
||||
|
||||
Reference in New Issue
Block a user