fix: don't unmaximize on macOS if user set max bounds (#33480)
This commit is contained in:
parent
afe0116d59
commit
8c8642634d
3 changed files with 31 additions and 1 deletions
|
@ -3634,6 +3634,22 @@ describe('BrowserWindow module', () => {
|
|||
expectBoundsEqual(w.getSize(), initialSize);
|
||||
expectBoundsEqual(w.getPosition(), initialPosition);
|
||||
});
|
||||
|
||||
ifit(process.platform === 'darwin')('should not change size or position of a window which is functionally maximized', async () => {
|
||||
const { workArea } = screen.getPrimaryDisplay();
|
||||
|
||||
const bounds = {
|
||||
x: workArea.x,
|
||||
y: workArea.y,
|
||||
width: workArea.width,
|
||||
height: workArea.height
|
||||
};
|
||||
|
||||
const w = new BrowserWindow(bounds);
|
||||
w.unmaximize();
|
||||
await delay(1000);
|
||||
expectBoundsEqual(w.getBounds(), bounds);
|
||||
});
|
||||
});
|
||||
|
||||
describe('setFullScreen(false)', () => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue