* 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:
far 1998-11-12 21:46:24 +00:00
parent 16d4a03a08
commit 51eeb7b526
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 * NSWindow.m move various non OS XDPS specific methods to XDPS, move
various front end methods out of XRWindow and into NSWindow, fix various front end methods out of XRWindow and into NSWindow, fix
center method. 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> Mon Nov 9 1998 Richard Frith-Macdonald <richard@brainstorm.co.uk>

View file

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