fix: window ordering on mac (#30067)

* fix: window ordering on mac

* chore: fix flaky fullscreen inheritance test

Co-authored-by: deepak1556 <hop2deep@gmail.com>
This commit is contained in:
trop[bot]
2021-07-12 00:22:49 -07:00
committed by GitHub
parent f459315060
commit fc06c55bc0
2 changed files with 14 additions and 2 deletions

View File

@@ -1781,8 +1781,6 @@ gfx::Rect NativeWindowMac::WindowBoundsToContentBounds(
}
void NativeWindowMac::SetActive(bool is_key) {
if (is_key)
widget()->Activate();
is_active_ = is_key;
}

View File

@@ -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', () => {