Use theme's displayPopUpMenu method rather than rightMouseDisplay to inform which window we want it in

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/branches/gnustep_testplant_branch@36721 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Marcian Lytwyn 2013-06-11 23:51:18 +00:00
parent 1b649920e9
commit 139c233e05

View file

@ -1543,13 +1543,13 @@ static BOOL menuBarVisible = YES;
}
+ (void) popUpContextMenu: (NSMenu*)menu
withEvent: (NSEvent*)event
forView: (NSView*)view
withEvent: (NSEvent*)event
forView: (NSView*)view
{
[self popUpContextMenu: menu
withEvent: event
forView: view
withFont: nil];
[self popUpContextMenu: menu
withEvent: event
forView: view
withFont: nil];
}
+ (void) popUpContextMenu: (NSMenu *)menu
@ -1557,7 +1557,15 @@ static BOOL menuBarVisible = YES;
forView: (NSView *)view
withFont: (NSFont *)font
{
[menu _rightMouseDisplay: event];
NSWindow *window = [view window];
NSPoint point = [window convertBaseToScreen: [event locationInWindow]];
NSRect cellFrame = NSMakeRect(point.x, point.y, 0, 0);
[[GSTheme theme] displayPopUpMenu: [menu menuRepresentation]
withCellFrame: cellFrame
controlViewWindow: window
preferredEdge: NSMinXEdge
selectedItem: 0];
}
/*