This commit is contained in:
Troy
2018-10-08 18:18:02 -07:00
committed by Charles Kerr
parent e55d7d6f1e
commit 2663d3e10d
2 changed files with 8 additions and 1 deletions

View File

@@ -608,6 +608,7 @@ void NativeWindowViews::SetResizable(bool resizable) {
// both the minimum and maximum size to the window size to achieve it.
if (resizable) {
SetContentSizeConstraints(old_size_constraints_);
SetMaximizable(maximizable_);
} else {
old_size_constraints_ = GetContentSizeConstraints();
resizable_ = false;

View File

@@ -2349,9 +2349,15 @@ describe('BrowserWindow module', () => {
// Only implemented on windows.
if (process.platform !== 'win32') return
it('is set to false when resizable state is set to false', () => {
it('is reset to its former state', () => {
w.setMaximizable(false)
w.setResizable(false)
w.setResizable(true)
assert.equal(w.isMaximizable(), false)
w.setMaximizable(true)
w.setResizable(false)
w.setResizable(true)
assert.strictEqual(w.isMaximizable(), true)
})
})