diff --git a/src/main/mainWindow.js b/src/main/mainWindow.js index 55a92c54..b93caec9 100644 --- a/src/main/mainWindow.js +++ b/src/main/mainWindow.js @@ -146,11 +146,11 @@ function createMainWindow(config, options) { // need to leave fullscreen first, then hide the window if (mainWindow.isFullScreen()) { mainWindow.once('leave-full-screen', () => { - hideWindow(mainWindow); + app.hide(); }); mainWindow.setFullScreen(false); } else { - hideWindow(mainWindow); + app.hide(); } break; default: diff --git a/test/specs/app_test.js b/test/specs/app_test.js index 76457c6a..f92066b7 100644 --- a/test/specs/app_test.js +++ b/test/specs/app_test.js @@ -34,6 +34,20 @@ describe('application', function desc() { visible.should.be.true; }); + if (process.platform === 'darwin') { + it.skip('should show closed window with cmd+tab', async () => { + // Unable to utilize Command key press due to: https://bugs.chromium.org/p/chromedriver/issues/detail?id=3023#c2 + await this.app.client.waitUntilWindowLoaded(); + await this.app.client.keys(['Meta', 'w']); + let visible = await this.app.browserWindow.isVisible(); + visible.should.be.false; + + this.app.client.keys(['Meta', 'Tab']); + visible = await this.app.browserWindow.isVisible(); + visible.should.be.true; + }); + } + it.skip('should restore window bounds', async () => { // bounds seems to be incorrectly calculated in some environments // - Windows 10: OK