Flash Window also without systray icon

This commit is contained in:
Tim Roes
2016-07-25 13:54:46 +02:00
parent 6a99bdb72c
commit 32509ad8c2

View File

@@ -218,6 +218,13 @@ allowProtocolDialog.init(mainWindow);
// This method will be called when Electron has finished
// initialization and is ready to create browser windows.
app.on('ready', function() {
ipcMain.on('notified', function(event, arg) {
if (process.platform === 'win32' || process.platform === 'linux') {
if (config.notifications.flashWindow === 2) {
mainWindow.flashFrame(true);
}
}
});
if (shouldShowTrayIcon()) {
// set up tray icon
trayIcon = new Tray(trayImages.normal);
@@ -261,12 +268,6 @@ app.on('ready', function() {
mainWindow.focus();
});
ipcMain.on('notified', function(event, arg) {
if (process.platform === 'win32' || process.platform === 'linux') {
if (config.notifications.flashWindow === 2) {
mainWindow.flashFrame(true);
}
}
if (process.platform === 'win32') {
// On Windows 8.1 and Windows 8, a shortcut with a Application User Model ID must be installed to the Start screen.
// In current version, use tray balloon for notification