<p dir="auto">I read that there is/was a problem on tray right-clicked event. It is/was triggering clicked as well. I'm not sure it's fixed or not.</p>
<p dir="auto">I'm trying to show the contextMenu only on right-clicked to tray icon in Mac.</p>
<p dir="auto">I tried to preventDefault from click and right-clicked events, no luck. If there is a contextMenu on a tray, It anyway shows the context menu and doesn't run the code i have in the clicked event (I'm showing/hiding the window by single click)</p>
<p dir="auto">I'm looking a way/workaround to show the contextMenu when only right clicked.</p>
<p dir="auto">Tev.</p>
<p dir="auto">I'm not sure what the API would look like, nor am I confident how this would work cross-platform, however the current implementation of the tray context menu is <a href="https://github.com/atom/electron/blob/e4a7352b6299a03a42f545cfec1c45dde60bac41/atom/browser/ui/tray_icon_cocoa.mm#L210-L216">force-bound to the primary click action</a> (at least on Mac).</p>
<p dir="auto">Would rather the ability to perform a different primary action on click but display the context menu on right click.</p>
<p dir="auto">Would it be possible and make sense to expose this kind of configuration? Perhaps exposing the underlying mechanisms (menu + positioning? Not a native dev so <code class="notranslate">¯\_(ツ)_/¯</code>) to recreate a tray context menu without <code class="notranslate">setContextMenu</code>?</p>