Skip to content

Commit

Permalink
Fix warning about possible memory leak detected due to tray click lis…
Browse files Browse the repository at this point in the history
…tener being added over and over.
  • Loading branch information
HomerSp committed Apr 29, 2021
1 parent 79eb9ed commit c105351
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main.coffee
Expand Up @@ -357,11 +357,11 @@ app.on 'ready', ->
tray.setImage iconpath unless tray.currentImage == iconpath
else
tray = new Tray iconpath
tray.on 'click', (ev) -> ipcsend 'menuaction', 'togglewindow'

tray.currentImage = iconpath

tray.setToolTip toolTip
tray.on 'click', (ev) -> ipcsend 'menuaction', 'togglewindow'

if menu
# build functions that cannot be sent via ipc
Expand Down

0 comments on commit c105351

Please sign in to comment.