diff --git a/Source/NSMenu.m b/Source/NSMenu.m index 7b6c65b09..11e40abdc 100644 --- a/Source/NSMenu.m +++ b/Source/NSMenu.m @@ -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]; } /*