mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-30 12:50:40 +00:00
* Source/NSMenuView.m: Fix to previous change to
[NSMenuView _executeItemAtIndex:removeSubmenu:]. Assign attachedMenu to local variable and test for nil prior to entering the code to close the menu when tracking the mouse for normal menus. Previous version of this code was causing menu items owned by pull downs (NSPopUpButton) to close prior to mouse up event. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@31896 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
b3d789fcec
commit
11d7762cec
2 changed files with 14 additions and 2 deletions
|
@ -1586,6 +1586,7 @@ static NSMapTable *viewInfo = 0;
|
|||
NSPoint locationInScreenCoordinates;
|
||||
NSWindow *windowUnderMouse;
|
||||
NSMenu *candidateMenu;
|
||||
NSMenu *anAttachedMenu = [[[NSApp mainWindow] menu] attachedMenu];
|
||||
|
||||
subMenusNeedRemoving = NO;
|
||||
|
||||
|
@ -1656,7 +1657,8 @@ static NSMapTable *viewInfo = 0;
|
|||
/*We track the menu correctly when this is located
|
||||
in a window*/
|
||||
if (NSInterfaceStyleForKey(@"NSMenuInterfaceStyle", self) ==
|
||||
NSWindows95InterfaceStyle)
|
||||
NSWindows95InterfaceStyle &&
|
||||
anAttachedMenu != nil)
|
||||
{
|
||||
if ([self hitTest: location] == nil)
|
||||
{
|
||||
|
@ -1667,7 +1669,7 @@ static NSMapTable *viewInfo = 0;
|
|||
|
||||
if (space == 2)
|
||||
{
|
||||
[[[[NSApp mainWindow] menu] attachedMenu] close];
|
||||
[anAttachedMenu close];
|
||||
shouldFinish = YES;
|
||||
return NO;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue