Improved window state handling

Closes #249
This commit is contained in:
Kolja Lampe
2016-08-16 23:12:41 +02:00
parent e514d87fc5
commit 7429df05f5
4 changed files with 23 additions and 8 deletions

View File

@@ -13,7 +13,12 @@ function createTemplate(mainWindow, config) {
label: team.name,
accelerator: `CmdOrCtrl+${i + 1}`,
click: (item, focusedWindow) => {
mainWindow.show(); // for OS X
if (mainWindow.isMinimized()) {
mainWindow.restore();
}
else {
mainWindow.show();
}
mainWindow.webContents.send('switch-tab', i);
if (process.platform === 'darwin') {