Skip to content

Commit

Permalink
show application if not focused
Browse files Browse the repository at this point in the history
When clicking on the tray icon, if window is not focused show it instead of closing it.
If window is closed or not focused will be shown.
  • Loading branch information
jeroni committed Mar 6, 2024
1 parent 06117b5 commit cf4c812
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/app/app.tray.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ function setupTray(browserWindow) {
role: 'quit',
},
]))
tray.on('click', () => browserWindow.show())
tray.on('click', () => browserWindow.isFocused() ? browserWindow.close() : browserWindow.show())

browserWindow.on('close', event => {
if (!isAppQuitting) {
Expand Down

0 comments on commit cf4c812

Please sign in to comment.