Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: don't unmaximize on macOS if user set max bounds #33480

Merged
merged 1 commit into from Mar 30, 2022

Conversation

codebytere
Copy link
Member

Description of Change

Closes #33329.

Fixes an issue where a BrowserWindow would inexplicably become tiny if BrowserWindow.unmaximize() was called when the last set bounds were the size of the screen.

Per docs during zoom::

If there’s no saved user state because there has been no previous
zoom,the size and location of the window don’t change.

However, in classic Apple fashion, this is not the case in practice, and the frame inexplicably becomes very tiny. We should prevent zoom from being called if the window is being unmaximized and its unmaximized window bounds are themselves functionally maximized.

Checklist

Release Notes

Notes: Fixed an issue where the the window bounds would incorrectly change if BrowserWindow.unmaximize was called on a window whose user bounds were maximized.

@codebytere codebytere added semver/patch backwards-compatible bug fixes target/16-x-y labels Mar 28, 2022
@electron-cation electron-cation bot added the new-pr 🌱 PR opened in the last 24 hours label Mar 28, 2022
Copy link
Contributor

@jkleinsc jkleinsc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like this change causes maximize tests to fail.

@electron-cation electron-cation bot removed the new-pr 🌱 PR opened in the last 24 hours label Mar 29, 2022
@codebytere codebytere force-pushed the fix-max-unmax-macos branch 2 times, most recently from 7afe333 to 02c3a48 Compare March 30, 2022 07:58
@codebytere codebytere merged commit 8c86426 into main Mar 30, 2022
@codebytere codebytere deleted the fix-max-unmax-macos branch March 30, 2022 22:29
@release-clerk
Copy link

release-clerk bot commented Mar 30, 2022

Release Notes Persisted

Fixed an issue where the the window bounds would incorrectly change if BrowserWindow.unmaximize was called on a window whose user bounds were maximized.

@trop
Copy link
Contributor

trop bot commented Mar 30, 2022

I was unable to backport this PR to "18-x-y" cleanly;
you will need to perform this backport manually.

@trop
Copy link
Contributor

trop bot commented Mar 30, 2022

I was unable to backport this PR to "17-x-y" cleanly;
you will need to perform this backport manually.

@trop trop bot removed target/18-x-y labels Mar 30, 2022
@trop
Copy link
Contributor

trop bot commented Mar 30, 2022

I was unable to backport this PR to "16-x-y" cleanly;
you will need to perform this backport manually.

@trop
Copy link
Contributor

trop bot commented Mar 30, 2022

I was unable to backport this PR to "19-x-y" cleanly;
you will need to perform this backport manually.

@trop trop bot removed target/16-x-y labels Mar 30, 2022
@trop
Copy link
Contributor

trop bot commented Mar 31, 2022

The backport process for this PR has been manually initiated - sending your PR to 18-x-y!

@trop
Copy link
Contributor

trop bot commented Mar 31, 2022

The backport process for this PR has been manually initiated - sending your PR to 17-x-y!

@trop
Copy link
Contributor

trop bot commented Mar 31, 2022

The backport process for this PR has been manually initiated - sending your PR to 16-x-y!

@trop
Copy link
Contributor

trop bot commented Mar 31, 2022

I have automatically backported this PR to "19-x-y", please check out #33549

@trop
Copy link
Contributor

trop bot commented Mar 31, 2022

I have automatically backported this PR to "18-x-y", please check out #33550

@trop
Copy link
Contributor

trop bot commented Mar 31, 2022

I have automatically backported this PR to "17-x-y", please check out #33551

@trop
Copy link
Contributor

trop bot commented Mar 31, 2022

I have automatically backported this PR to "16-x-y", please check out #33552

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
semver/patch backwards-compatible bug fixes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: Full Height BrowserWindow Unmaximizes to Bottom Left of Screen
3 participants