Skip to content

Commit

Permalink
fix: window ordering on mac
Browse files Browse the repository at this point in the history
  • Loading branch information
deepak1556 committed Jul 1, 2021
1 parent bc20205 commit 0282ca4
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
2 changes: 0 additions & 2 deletions shell/browser/native_window_mac.mm
Expand Up @@ -1647,8 +1647,6 @@ void ViewDidMoveToSuperview(NSView* self, SEL _cmd) {
}

void NativeWindowMac::SetActive(bool is_key) {
if (is_key)
widget()->Activate();
is_active_ = is_key;
}

Expand Down
12 changes: 12 additions & 0 deletions spec-main/api-browser-window-spec.ts
Expand Up @@ -4304,6 +4304,18 @@ describe('BrowserWindow module', () => {
await leaveFullScreen;
expect(w.isFullScreen()).to.be.false('isFullScreen');
});

it('multiple windows inherit correct fullscreen state', async () => {
const w = new BrowserWindow();
const enterFullScreen = emittedOnce(w, 'enter-full-screen');
w.setFullScreen(true);
await enterFullScreen;
expect(w.isFullScreen()).to.be.true('isFullScreen');
await delay();
const w2 = new BrowserWindow();
await delay();
expect(w2.isFullScreen()).to.be.true('isFullScreen');
});
});

describe('closable state', () => {
Expand Down

0 comments on commit 0282ca4

Please sign in to comment.