chore: revert key -> main change in window delegate listener (#19221)

* chore: revert key -> main

* chore: comment out test that will fail

* more context on commented out test

* remove commented test
This commit is contained in:
trop[bot]
2019-07-14 10:55:36 +09:00
committed by Cheng Zhao
parent c8029d1696
commit 5e2ca967c9
2 changed files with 2 additions and 30 deletions

View File

@@ -84,11 +84,11 @@
return frame;
}
- (void)windowDidBecomeKey:(NSNotification*)notification {
- (void)windowDidBecomeMain:(NSNotification*)notification {
shell_->NotifyWindowFocus();
}
- (void)windowDidResignKey:(NSNotification*)notification {
- (void)windowDidResignMain:(NSNotification*)notification {
shell_->NotifyWindowBlur();
}

View File

@@ -2563,34 +2563,6 @@ describe('BrowserWindow module', () => {
})
})
describe('focus event', () => {
it('should not emit if focusing on a main window with a modal open', (done) => {
const childWindowClosed = false
const child = new BrowserWindow({
parent: w,
modal: true,
show: false
})
child.once('ready-to-show', () => {
child.show()
})
child.on('show', () => {
w.once('focus', () => {
expect(child.isDestroyed()).to.equal(true)
done()
})
w.focus() // this should not trigger the above listener
child.close()
})
// act
child.loadURL(server.url)
w.show()
})
})
describe('sheet-begin event', () => {
let sheet = null