Skip to content
Permalink
Browse files

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

* chore: revert key -> main

* chore: comment out test that will fail

* more context on commented out test

* remove commented test
  • Loading branch information...
erickzhao authored and zcbenz committed Jul 12, 2019
1 parent 3529489 commit 9a42ddd2b847280fb5c6a32bef73bc55c658d8f2
Showing with 2 additions and 30 deletions.
  1. +2 −2 shell/browser/ui/cocoa/atom_ns_window_delegate.mm
  2. +0 −28 spec/api-browser-window-spec.js
@@ -88,11 +88,11 @@ - (NSRect)windowWillUseStandardFrame:(NSWindow*)window
return frame;
}

- (void)windowDidBecomeKey:(NSNotification*)notification {
- (void)windowDidBecomeMain:(NSNotification*)notification {
shell_->NotifyWindowFocus();
}

- (void)windowDidResignKey:(NSNotification*)notification {
- (void)windowDidResignMain:(NSNotification*)notification {
shell_->NotifyWindowBlur();
}

@@ -1325,34 +1325,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

0 comments on commit 9a42ddd

Please sign in to comment.
You can’t perform that action at this time.