summaryrefslogtreecommitdiffhomepage
path: root/app/main.js
diff options
context:
space:
mode:
Diffstat (limited to 'app/main.js')
-rw-r--r--app/main.js8
1 files changed, 6 insertions, 2 deletions
diff --git a/app/main.js b/app/main.js
index 9d91621949..67a580bf08 100644
--- a/app/main.js
+++ b/app/main.js
@@ -32,10 +32,12 @@ const stopTrayEventMonitor = () => {
}
};
-ipcMain.on('changeTrayIcon', (event, type) => {
- trayIconManager.iconType = type;
+ipcMain.on('changeTrayIcon', (event, data) => {
+ trayIconManager.updateIconType(data.type, data.skipAnimation);
});
+ipcMain.emit();
+
// hide dock icon
if(process.platform === 'darwin') {
app.dock.hide();
@@ -130,10 +132,12 @@ const createWindow = () => {
window.on('show', () => {
startTrayEventMonitor(window);
+ window.webContents.send('showWindow');
});
window.on('hide', () => {
stopTrayEventMonitor();
+ window.webContents.send('hideWindow');
});
};