diff --git a/ChangeLog b/ChangeLog index 0fbe038e2..67db44ad0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -10,6 +10,7 @@ Thu Nov 12 1998 Felipe A. Rodriguez * 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 diff --git a/Source/NSApplication.m b/Source/NSApplication.m index 3469d0dd1..fff3ca038 100644 --- a/Source/NSApplication.m +++ b/Source/NSApplication.m @@ -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