mirror of
https://github.com/electron/electron.git
synced 2026-04-10 03:01:51 -04:00
fix: restoring X11 window should not remove previous maximize state (#37358)
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com> Co-authored-by: Cheng Zhao <zcbenz@gmail.com>
This commit is contained in:
@@ -3990,6 +3990,24 @@ describe('BrowserWindow module', () => {
|
||||
w.hide();
|
||||
w.show();
|
||||
});
|
||||
|
||||
// TODO(zcbenz):
|
||||
// This test does not run on Linux CI. See:
|
||||
// https://github.com/electron/electron/issues/28699
|
||||
ifit(process.platform === 'linux' && !process.env.CI)('should bring a minimized maximized window back to maximized state', async () => {
|
||||
const w = new BrowserWindow({});
|
||||
const maximize = emittedOnce(w, 'maximize');
|
||||
w.maximize();
|
||||
await maximize;
|
||||
const minimize = emittedOnce(w, 'minimize');
|
||||
w.minimize();
|
||||
await minimize;
|
||||
expect(w.isMaximized()).to.equal(false);
|
||||
const restore = emittedOnce(w, 'restore');
|
||||
w.restore();
|
||||
await restore;
|
||||
expect(w.isMaximized()).to.equal(true);
|
||||
});
|
||||
});
|
||||
|
||||
// TODO(dsanders11): Enable once maximize event works on Linux again on CI
|
||||
|
||||
Reference in New Issue
Block a user