Changeset 21961

Show
Ignore:
Timestamp:
08/14/07 22:12:05 (16 months ago)
Author:
axeld
Message:

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.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • haiku/trunk/src/kits/interface/Window.cpp

    r21959 r21961  
    10091009                        BView *view = dynamic_cast<BView *>(target); 
    10101010                         
    1011                         // Close an eventually opened menu, unless the target is the menu itself 
     1011                        // Close an eventually opened menu, if this click targets the 
     1012                        // preferred handler, and unless the target is the menu itself 
    10121013                        BMenu *menu = dynamic_cast<BMenu *>(fFocus); 
    1013                         if (menu != NULL && menu != view && menu->State() != MENU_STATE_CLOSED) { 
     1014                        if (menu != NULL && menu != view && PreferredHandler() == target 
     1015                                && menu->State() != MENU_STATE_CLOSED) { 
    10141016                                menu->QuitTracking(); 
    10151017                                return;