fix: desktopCapturer breaks BrowserWindow resizable on macOS (#43013)
* fix: desktopCapturer breaks BrowserWindow resizable on macOS * test: oops fix showing
This commit is contained in:
parent
c2c079dc82
commit
cfdcf48e1b
3 changed files with 34 additions and 1 deletions
|
@ -148,6 +148,20 @@ ifdescribe(!process.arch.includes('arm') && process.platform !== 'win32')('deskt
|
|||
}
|
||||
});
|
||||
|
||||
// Regression test - see https://github.com/electron/electron/issues/43002
|
||||
it('does not affect window resizable state', async () => {
|
||||
w.resizable = false;
|
||||
|
||||
const wShown = once(w, 'show');
|
||||
w.show();
|
||||
await wShown;
|
||||
|
||||
const sources = await desktopCapturer.getSources({ types: ['window', 'screen'] });
|
||||
expect(sources).to.be.an('array').that.is.not.empty();
|
||||
|
||||
expect(w.resizable).to.be.false();
|
||||
});
|
||||
|
||||
it('moveAbove should move the window at the requested place', async () => {
|
||||
// DesktopCapturer.getSources() is guaranteed to return in the correct
|
||||
// z-order from foreground to background.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue