fix: window ordering on mac (#29857)

This commit is contained in:
Robo 2021-07-10 05:38:25 +09:00 committed by GitHub
parent 98f617e856
commit ccfde6c9d4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 12 additions and 2 deletions

View file

@ -1682,8 +1682,6 @@ void NativeWindowMac::NotifyWindowWillLeaveFullScreen() {
}
void NativeWindowMac::SetActive(bool is_key) {
if (is_key)
widget()->Activate();
is_active_ = is_key;
}

View file

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