Implement handling of pop-up menus attached to NSView:s.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@15906 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
alexm 2003-02-08 21:39:31 +00:00
parent 1c1ddf28cf
commit 54cd2019eb
2 changed files with 21 additions and 3 deletions

View file

@ -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: