diff --git a/ChangeLog b/ChangeLog index 9e86391f1..c845a502c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2003-02-08 22:29 Alexander Malmberg + + * Source/NSWindow.m (-sendEvent:): On right mouse down, check if + the view that is hit has a pop-up menu, and if so, display it + instead of sending the event to the view. Based on patch from + Matt Rice. + 2003-02-08 17:51 Alexander Malmberg * Headers/gnustep/gui/NSLayoutManager.h, Source/NSLayoutManager.m: diff --git a/Source/NSWindow.m b/Source/NSWindow.m index b80d7831b..d3d7e2436 100644 --- a/Source/NSWindow.m +++ b/Source/NSWindow.m @@ -2878,9 +2878,20 @@ Code shared with [NSPanel -sendEvent:], remember to update both places. break; case NSRightMouseDown: - v = [_contentView hitTest: [theEvent locationInWindow]]; - [v rightMouseDown: theEvent]; - _lastPoint = [theEvent locationInWindow]; + { + NSMenu *m; + v = [_contentView hitTest: [theEvent locationInWindow]]; + m = [v menuForEvent: theEvent]; + if (m) + { + [m _rightMouseDisplay: theEvent]; + } + else + { + [v rightMouseDown: theEvent]; + } + _lastPoint = [theEvent locationInWindow]; + } break; case NSRightMouseUp: