mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-23 15:11:37 +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
f999016f34
commit
8133269602
2 changed files with 14 additions and 2 deletions
10
ChangeLog
10
ChangeLog
|
@ -1,3 +1,13 @@
|
|||
2011-01-15 23:50-EST Gregory John Casamento <greg.casamento@gmail.com>
|
||||
|
||||
* 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.
|
||||
|
||||
2011-01-15 German Arias <german@xelalug.org>
|
||||
|
||||
* Source/NSWindow.m:
|
||||
|
|
|
@ -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…
Reference in a new issue