mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-24 06:28:54 +00:00
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:
parent
39744f3b2f
commit
4648c930ce
2 changed files with 21 additions and 3 deletions
|
@ -1,3 +1,10 @@
|
|||
2003-02-08 22:29 Alexander Malmberg <alexander@malmberg.org>
|
||||
|
||||
* 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 <alexander@malmberg.org>
|
||||
|
||||
* Headers/gnustep/gui/NSLayoutManager.h, Source/NSLayoutManager.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:
|
||||
|
|
Loading…
Reference in a new issue