バルーン通知をクリックした場合にメイン画面にフォーカスを移す

This commit is contained in:
Yuya Ochiai
2015-11-03 19:15:24 +09:00
parent dc45034395
commit 95376adebe

View File

@@ -54,6 +54,9 @@ app.on('ready', function() {
if (process.platform === 'win32') {
trayIcon = new Tray(__dirname + '/tray.png');
trayIcon.setToolTip(app.getName());
trayIcon.on('balloon-clicked', function() {
mainWindow.focus();
});
ipc.on('notified', function(event, arg) {
trayIcon.displayBalloon({
title: arg.title,