The bug worked around in r21960 also affected Haiku. Now, a menu is only quit if the click

into its "controlling" window targeted the preferred handler - ie. is a standard click that
is not sent because of an event mask.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21961 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler
2007-08-15 02:12:05 +00:00
parent f8ab4e92ed
commit cc116483ef
+4 -2
View File
@@ -1008,9 +1008,11 @@ FrameMoved(origin);
{
BView *view = dynamic_cast<BView *>(target);
// Close an eventually opened menu, unless the target is the menu itself
// Close an eventually opened menu, if this click targets the
// preferred handler, and unless the target is the menu itself
BMenu *menu = dynamic_cast<BMenu *>(fFocus);
if (menu != NULL && menu != view && menu->State() != MENU_STATE_CLOSED) {
if (menu != NULL && menu != view && PreferredHandler() == target
&& menu->State() != MENU_STATE_CLOSED) {
menu->QuitTracking();
return;
}