<p dir="auto">Hello,</p>
<p dir="auto">I'm building a tray (menubar) app using electron.<br>
I know that there is a way of getting tray icon bounds through tray.on('click' function(event, bounds){}) event, but sometimes I want to show a BrowserWindow without tray.on('click') event.</p>
<p dir="auto">For example, when I want to show the BrowserWindow when pressing the GlobalShortcut, it doesn't pass tray.on('click'), so technically there is no way to get bounds of tray icon.</p>
<p dir="auto">To do this, there is two possible way.</p>
<ol dir="auto">
<li>Get a tray position and call BrowserWindow.setBounds()</li>
<li>Call a tray.click event so I can get a tray bounds.</li>
</ol>
<p dir="auto">I would appreciate if someone give me any way to resolve this issue.<br>
Thanks.</p>
<p dir="auto">For instance when you have a menubar app and you want to trigger <code class="notranslate">window.show()</code> with a global shortcut or any other way that does not involves clicking on the tray icon. :)</p>