Merge pull request #9645 from dharders/issue6036-fix-windows-fullscreen-startup-toggle
Fix unresponsive app after fullscreen->normal state toggle (Windows)
This commit is contained in:
commit
45dc6fc04f
2 changed files with 44 additions and 0 deletions
|
@ -2102,6 +2102,41 @@ describe('BrowserWindow module', function () {
|
|||
})
|
||||
})
|
||||
|
||||
describe('BrowserWindow.setFullScreen(false)', function () {
|
||||
// only applicable to windows: https://github.com/electron/electron/issues/6036
|
||||
if (process.platform !== 'win32') return
|
||||
|
||||
it('should restore a normal visible window from a fullscreen startup state', function (done) {
|
||||
w.webContents.once('did-finish-load', function () {
|
||||
// start fullscreen and hidden
|
||||
w.setFullScreen(true)
|
||||
w.once('show', function () {
|
||||
// restore window to normal state
|
||||
w.setFullScreen(false)
|
||||
})
|
||||
w.once('leave-full-screen', function () {
|
||||
assert.equal(w.isVisible(), true)
|
||||
assert.equal(w.isFullScreen(), false)
|
||||
done()
|
||||
})
|
||||
w.show()
|
||||
})
|
||||
w.loadURL('about:blank')
|
||||
})
|
||||
|
||||
it('should keep window hidden if already in hidden state', function (done) {
|
||||
w.webContents.once('did-finish-load', function () {
|
||||
w.once('leave-full-screen', () => {
|
||||
assert.equal(w.isVisible(), false)
|
||||
assert.equal(w.isFullScreen(), false)
|
||||
done()
|
||||
})
|
||||
w.setFullScreen(false)
|
||||
})
|
||||
w.loadURL('about:blank')
|
||||
})
|
||||
})
|
||||
|
||||
describe('parent window', function () {
|
||||
let c = null
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue