mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-06-01 09:22:07 +00:00
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:
parent
1b649920e9
commit
139c233e05
1 changed files with 15 additions and 7 deletions
|
@ -1543,13 +1543,13 @@ static BOOL menuBarVisible = YES;
|
||||||
}
|
}
|
||||||
|
|
||||||
+ (void) popUpContextMenu: (NSMenu*)menu
|
+ (void) popUpContextMenu: (NSMenu*)menu
|
||||||
withEvent: (NSEvent*)event
|
withEvent: (NSEvent*)event
|
||||||
forView: (NSView*)view
|
forView: (NSView*)view
|
||||||
{
|
{
|
||||||
[self popUpContextMenu: menu
|
[self popUpContextMenu: menu
|
||||||
withEvent: event
|
withEvent: event
|
||||||
forView: view
|
forView: view
|
||||||
withFont: nil];
|
withFont: nil];
|
||||||
}
|
}
|
||||||
|
|
||||||
+ (void) popUpContextMenu: (NSMenu *)menu
|
+ (void) popUpContextMenu: (NSMenu *)menu
|
||||||
|
@ -1557,7 +1557,15 @@ static BOOL menuBarVisible = YES;
|
||||||
forView: (NSView *)view
|
forView: (NSView *)view
|
||||||
withFont: (NSFont *)font
|
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];
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue