fix: calculate frame when setting window placement (#25014)
This commit is contained in:
parent
9021843850
commit
52d7afa4ef
3 changed files with 33 additions and 8 deletions
|
@ -1005,6 +1005,26 @@ describe('BrowserWindow module', () => {
|
|||
await restore;
|
||||
expectBoundsEqual(w.getNormalBounds(), bounds);
|
||||
});
|
||||
it('does not change size for a frameless window with min size', async () => {
|
||||
w.destroy();
|
||||
w = new BrowserWindow({
|
||||
show: false,
|
||||
frame: false,
|
||||
width: 300,
|
||||
height: 300,
|
||||
minWidth: 300,
|
||||
minHeight: 300
|
||||
});
|
||||
const bounds = w.getBounds();
|
||||
w.once('minimize', () => {
|
||||
w.restore();
|
||||
});
|
||||
const restore = emittedOnce(w, 'restore');
|
||||
w.show();
|
||||
w.minimize();
|
||||
await restore;
|
||||
expectBoundsEqual(w.getNormalBounds(), bounds);
|
||||
});
|
||||
});
|
||||
|
||||
ifdescribe(process.platform === 'win32')('Fullscreen state', () => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue