* NSApplication.m sendEvent: add test for menu to right mouse display of.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@3214 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Felipe A. Rodriguez 1998-11-12 21:46:24 +00:00
parent 7cd0ae9f9c
commit f56ca9b4bd
2 changed files with 14 additions and 12 deletions

View file

@ -10,6 +10,7 @@ Thu Nov 12 1998 Felipe A. Rodriguez <far@ix.netcom.com>
* NSWindow.m move various non OS XDPS specific methods to XDPS, move
various front end methods out of XRWindow and into NSWindow, fix
center method.
* NSApplication.m sendEvent: add test for menu to right mouse display of.
Mon Nov 9 1998 Richard Frith-Macdonald <richard@brainstorm.co.uk>

View file

@ -286,18 +286,19 @@ NSAutoreleasePool* pool;
}
case NSRightMouseDown: // Right mouse down
{
static NSMenu *copyOfMainMenu = nil;
NSWindow *copyMenuWindow;
if(!copyOfMainMenu) // display the menu
copyOfMainMenu = [main_menu copy]; // under the mouse
copyMenuWindow = [copyOfMainMenu menuWindow];
[copyOfMainMenu _rightMouseDisplay];
[copyMenuWindow captureMouse:self];
[[copyOfMainMenu menuCells] mouseDown:theEvent];
[copyMenuWindow releaseMouse:self];
}
if(main_menu)
{
static NSMenu *copyOfMainMenu = nil;
NSWindow *copyMenuWindow;
if(!copyOfMainMenu) // display the menu
copyOfMainMenu = [main_menu copy]; // under the mouse
copyMenuWindow = [copyOfMainMenu menuWindow];
[copyOfMainMenu _rightMouseDisplay];
[copyMenuWindow captureMouse:self];
[[copyOfMainMenu menuCells] mouseDown:theEvent];
[copyMenuWindow releaseMouse:self];
}
break;
default: // pass all other events to