fix: fullscreen for windows without rounded corners (#47682)
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com> Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
This commit is contained in:
parent
f4e709c47e
commit
6e9a46042d
6 changed files with 67 additions and 10 deletions
|
@ -5993,6 +5993,54 @@ describe('BrowserWindow module', () => {
|
|||
await leaveFullScreen;
|
||||
});
|
||||
|
||||
it('should not crash if rounded corners are disabled', async () => {
|
||||
const w = new BrowserWindow({
|
||||
frame: false,
|
||||
roundedCorners: false
|
||||
});
|
||||
|
||||
const enterFullScreen = once(w, 'enter-full-screen');
|
||||
w.setFullScreen(true);
|
||||
await enterFullScreen;
|
||||
|
||||
await setTimeout();
|
||||
|
||||
const leaveFullScreen = once(w, 'leave-full-screen');
|
||||
w.setFullScreen(false);
|
||||
await leaveFullScreen;
|
||||
});
|
||||
|
||||
it('should not crash if opening a borderless child window from fullscreen parent', async () => {
|
||||
const parent = new BrowserWindow();
|
||||
|
||||
const parentFS = once(parent, 'enter-full-screen');
|
||||
parent.setFullScreen(true);
|
||||
await parentFS;
|
||||
|
||||
await setTimeout();
|
||||
|
||||
const child = new BrowserWindow({
|
||||
width: 400,
|
||||
height: 300,
|
||||
show: false,
|
||||
parent,
|
||||
frame: false,
|
||||
roundedCorners: false
|
||||
});
|
||||
|
||||
await setTimeout();
|
||||
|
||||
const childFS = once(child, 'enter-full-screen');
|
||||
child.show();
|
||||
await childFS;
|
||||
|
||||
await setTimeout();
|
||||
|
||||
const leaveFullScreen = once(child, 'leave-full-screen');
|
||||
child.setFullScreen(false);
|
||||
await leaveFullScreen;
|
||||
});
|
||||
|
||||
it('should be able to load a URL while transitioning to fullscreen', async () => {
|
||||
const w = new BrowserWindow({ fullscreen: true });
|
||||
w.loadFile(path.join(fixtures, 'pages', 'c.html'));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue