Focus to main window when tray icon is clicked
This commit is contained in:
@@ -56,6 +56,9 @@ app.on('ready', function() {
|
|||||||
trayIcon.setToolTip(app.getName());
|
trayIcon.setToolTip(app.getName());
|
||||||
var tray_menu = require('./menus/tray').createDefault();
|
var tray_menu = require('./menus/tray').createDefault();
|
||||||
trayIcon.setContextMenu(tray_menu);
|
trayIcon.setContextMenu(tray_menu);
|
||||||
|
trayIcon.on('clicked', function() {
|
||||||
|
mainWindow.focus();
|
||||||
|
});
|
||||||
trayIcon.on('balloon-clicked', function() {
|
trayIcon.on('balloon-clicked', function() {
|
||||||
mainWindow.focus();
|
mainWindow.focus();
|
||||||
});
|
});
|
||||||
|
Reference in New Issue
Block a user