Display tray icon only after window content completely loaded

This commit is contained in:
GHOSCHT 2020-08-07 19:27:57 +02:00
parent 76964f80a3
commit 75346bdd79

View file

@ -72,12 +72,14 @@ if (!gotTheLock) {
} }
}); });
//Create tray icon with context menu mainWindow.webContents.on('did-frame-finish-load', () => {
trayIcon = createTray(); //Create tray icon with context menu
trayIcon = createTray();
//Listen to tray icon onclick event //Listen to tray icon onclick event
trayIcon.on('click', () => { trayIcon.on('click', () => {
mainWindow.show(); mainWindow.show();
});
}); });
}); });
} }