Skip to content

Commit

Permalink
fix: window ordering on mac (#29857)
Browse files Browse the repository at this point in the history
  • Loading branch information
deepak1556 committed Jul 9, 2021
1 parent 98f617e commit ccfde6c
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 @@ -1682,8 +1682,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 @@ -4203,6 +4203,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 ccfde6c

Please sign in to comment.