Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Extend Tray click event with position
- Add a parameter to the `click` event of the `Tray` API object containing the coordinates of the tray icon/mouse pointer. The parameter has `x` and `y` fields for the coordinates. On Mac OS X the coordinates always refer to the position (lower left corner) of the tray item (NSStatusItem). On Aura (Linux, Windows) the coordinates refer to the cursor position (which would be inside the bounding box of the status icon but with slight differences depending on where effectively the user clicked). Usage example: tray.on('click', function(pos) { // pos.x is x coordinate of the tray icon // pos.y is y coordinate of the tray icon showCustomTrayMenuAt(pos); } FIX nwjs#1874
- Loading branch information