Allow positioning the context menu
This commit is contained in:
parent
03f19bea6b
commit
46e6b5ec3e
7 changed files with 40 additions and 5 deletions
|
@ -45,9 +45,12 @@ Menu::_init = ->
|
|||
break
|
||||
v8Util.setHiddenValue group[0], 'checked', true unless checked
|
||||
|
||||
Menu::popup = (window) ->
|
||||
Menu::popup = (window, x, y) ->
|
||||
throw new TypeError('Invalid window') unless window?.constructor is BrowserWindow
|
||||
@_popup window
|
||||
if x? and y?
|
||||
@_popupAt(window, x, y)
|
||||
else
|
||||
@_popup window
|
||||
|
||||
Menu::append = (item) ->
|
||||
@insert @getItemCount(), item
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue