Skip to content

Commit

Permalink
fix: window ordering on mac (#30067)
Browse files Browse the repository at this point in the history
* fix: window ordering on mac

* chore: fix flaky fullscreen inheritance test

Co-authored-by: deepak1556 <hop2deep@gmail.com>
  • Loading branch information
trop[bot] and deepak1556 committed Jul 12, 2021
1 parent f459315 commit fc06c55
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
2 changes: 0 additions & 2 deletions shell/browser/native_window_mac.mm
Expand Up @@ -1781,8 +1781,6 @@ void ViewDidMoveToSuperview(NSView* self, SEL _cmd) {
}

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

Expand Down
14 changes: 14 additions & 0 deletions spec-main/api-browser-window-spec.ts
Expand Up @@ -4256,6 +4256,20 @@ 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({ show: false });
const enterFullScreen2 = emittedOnce(w2, 'enter-full-screen');
w2.show();
await enterFullScreen2;
expect(w2.isFullScreen()).to.be.true('isFullScreen');
});
});

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

0 comments on commit fc06c55

Please sign in to comment.