Display tray icon only after window content completely loaded
This commit is contained in:
parent
76964f80a3
commit
75346bdd79
1 changed files with 7 additions and 5 deletions
|
@ -72,12 +72,14 @@ if (!gotTheLock) {
|
|||
}
|
||||
});
|
||||
|
||||
//Create tray icon with context menu
|
||||
trayIcon = createTray();
|
||||
mainWindow.webContents.on('did-frame-finish-load', () => {
|
||||
//Create tray icon with context menu
|
||||
trayIcon = createTray();
|
||||
|
||||
//Listen to tray icon onclick event
|
||||
trayIcon.on('click', () => {
|
||||
mainWindow.show();
|
||||
//Listen to tray icon onclick event
|
||||
trayIcon.on('click', () => {
|
||||
mainWindow.show();
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
|
|
Reference in a new issue