reverted r21961. A menu could be closed, if the user

clicked (with the menu opened) on a view which uses GetMouse() in a loop 
(PE, tracker), since it stealed the mousedown message.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24005 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Stefano Ceccherini 2008-02-18 13:24:13 +00:00
parent 50cd4d0280
commit ec20f9f60d

View File

@ -1058,10 +1058,10 @@ FrameMoved(origin);
{
BView *view = dynamic_cast<BView *>(target);
// Close an eventually opened menu, if this click targets the
// preferred handler, and unless the target is the menu itself
// Close an eventually opened menu
// unless the target is the menu itself
BMenu *menu = dynamic_cast<BMenu *>(fFocus);
if (menu != NULL && menu != view && PreferredHandler() == target
if (menu != NULL && menu != view
&& menu->State() != MENU_STATE_CLOSED) {
menu->QuitTracking();
return;