Browse Source

Minor change to tray. Focus on click, use click instead of double-click and focus window when behind another window.

pull/728/head
nmat 8 years ago
parent
commit
f995a783ba
  1. 8
      electron/tray.js

8
electron/tray.js

@ -50,8 +50,12 @@ exports.create = function(win, config) {
appIcon = new Tray(iconPath);
appIcon.setToolTip('Rambox');
appIcon.setContextMenu(contextMenu);
appIcon.on('double-click', () => {
if ( !win.isVisible() || win.isMinimized() ) config.get('maximized') ? win.maximize() : win.show();
appIcon.on('click', () => {
if ( !win.isVisible() ) {
win.isVisible() ? win.hide() : win.show();
} else {
win.focus();
}
});
};

Loading…
Cancel
Save