summaryrefslogtreecommitdiffhomepage
path: root/app/main.js
diff options
context:
space:
mode:
authorAndrej Mihajlov <and@codeispoetry.ru>2017-03-17 13:00:07 +0000
committerAndrej Mihajlov <and@codeispoetry.ru>2017-03-17 13:00:07 +0000
commitecdc49cc5866631aef05c5ffab91e46ff907bc36 (patch)
tree7e01663f6489fbc2c89315f846012e2d6b97b647 /app/main.js
parent3f44c0681bf6786a3fe6b6a0ded129028c8d1f7d (diff)
downloadmullvadvpn-ecdc49cc5866631aef05c5ffab91e46ff907bc36.tar.xz
mullvadvpn-ecdc49cc5866631aef05c5ffab91e46ff907bc36.zip
Update tray assets and hide spinner when window is visible
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');
});
};