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
|
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();
|
||||||
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
Reference in a new issue