fix: add check in IsMaximized for non-WS_THICKFRAME windows (#26586)

* fix: add check in IsMaximized for non-WS_THICKFRAME windows

* remove logs

* change GetPosition for GetNativeWindow

* change GetPosition for GetNativeWindow in IsMaximize

* add top left corner check

* add transparent maximization test

* replace window and display comparison

* rebase off master
This commit is contained in:
Michaela Laurencin 2020-11-30 22:27:58 -08:00 committed by GitHub
parent acfbbe9869
commit 32d4c9ad85
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 36 additions and 5 deletions

View file

@ -1059,6 +1059,25 @@ describe('BrowserWindow module', () => {
await unmaximize;
expectBoundsEqual(w.getNormalBounds(), bounds);
});
it('can check transparent window maximization', async () => {
w.destroy();
w = new BrowserWindow({
show: false,
width: 300,
height: 300,
transparent: true
});
const maximize = emittedOnce(w, 'resize');
w.show();
w.maximize();
await maximize;
expect(w.isMaximized()).to.equal(true);
const unmaximize = emittedOnce(w, 'resize');
w.unmaximize();
await unmaximize;
expect(w.isMaximized()).to.equal(false);
});
});
ifdescribe(process.platform !== 'linux')('Minimized state', () => {