From c105351eb91f004facc9f2ad511dffb777f49a52 Mon Sep 17 00:00:00 2001 From: Mathias Tillman Date: Mon, 8 Feb 2021 11:37:26 +0100 Subject: [PATCH] Fix warning about possible memory leak detected due to tray click listener being added over and over. --- src/main.coffee | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main.coffee b/src/main.coffee index 75a508ac..7cc641ad 100644 --- a/src/main.coffee +++ b/src/main.coffee @@ -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