Skip to content

Commit

Permalink
Close RocketChat#151; Restoring maximized window from tray restores t…
Browse files Browse the repository at this point in the history
…o not maximized window size
  • Loading branch information
rodrigok committed Apr 5, 2016
1 parent 0b86ae9 commit 979d405
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 8 deletions.
3 changes: 1 addition & 2 deletions app/background.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// It doesn't have any windows which you can see on screen, but we can open
// window from here.

import { app, BrowserWindow, dialog } from 'electron';
import { app, BrowserWindow } from 'electron';
import devHelper from './vendor/electron_boilerplate/dev_helper';
import windowStateKeeper from './vendor/electron_boilerplate/window_state';
import certificate from './certificate';
Expand All @@ -18,7 +18,6 @@ if (process.platform !== 'darwin') {
var shouldQuit = app.makeSingleInstance(function() {
// Someone tried to run a second instance, we should focus our window.
if (mainWindow) {
mainWindow.restore();
mainWindow.show();
mainWindow.focus();
}
Expand Down
2 changes: 0 additions & 2 deletions app/scripts/menus.js
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,6 @@ if (process.platform === 'darwin') {
accelerator: 'Command+N',
click: function() {
var mainWindow = remote.getCurrentWindow();
mainWindow.restore();
mainWindow.show();
servers.clearActive();
}
Expand All @@ -223,7 +222,6 @@ if (process.platform === 'darwin') {
label: 'Bring All to Front',
click: function() {
var mainWindow = remote.getCurrentWindow();
mainWindow.restore();
mainWindow.show();
}
}
Expand Down
1 change: 0 additions & 1 deletion app/scripts/sidebar.js
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,6 @@ class SideBar extends EventEmitter {
id: host.url,
click: () => {
var mainWindow = remote.getCurrentWindow();
mainWindow.restore();
mainWindow.show();
this.emit('click', host.url);
servers.setActive(host.url);
Expand Down
3 changes: 0 additions & 3 deletions app/scripts/tray.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ function createAppTray() {
}, {
label: 'Show',
click: function() {
mainWindow.restore();
mainWindow.show();
}
}, {
Expand All @@ -50,7 +49,6 @@ function createAppTray() {

if (process.platform === 'darwin' || process.platform === 'win32') {
_tray.on('double-click', function() {
mainWindow.restore();
mainWindow.show();
});
} else {
Expand All @@ -65,7 +63,6 @@ function createAppTray() {
} else {
clearTimeout(dblClickTimeoutFct);
dblClickTimeoutFct = null;
mainWindow.restore();
mainWindow.show();
}
});
Expand Down

0 comments on commit 979d405

Please sign in to comment.