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: macOS maximize button shouldn't be disabled just because the window is non-fullscreenable #40705
fix: macOS maximize button shouldn't be disabled just because the window is non-fullscreenable #40705
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The code in this PR makes sense to me. And thanks for adding a test!
Holding back on an Approve for now because I'd like feedback from @codebytere. The comment in her previous PR about handling fullsize + maximize + resizable in a way that's consistent cross-platform is tricky so I'd like a second opinion.
86738a8
to
bdac14e
Compare
Tray icon related failures are probably fixed by 6602703, merged recently. So, unrelated to this PR :) |
…dow is non-fullscreenable
… fullscreenable)` instead of `(resizable && maximizable) && fullscreenable`
bdac14e
to
f3c10b8
Compare
Rebased! |
Release Notes Persisted
|
I have automatically backported this PR to "27-x-y", please check out #40895 |
I have automatically backported this PR to "28-x-y", please check out #40896 |
I have automatically backported this PR to "29-x-y", please check out #40897 |
@codebytere I am afraid this fix is causing a regression, just run the default Fiddle test-app and make the window fullscreen by clicking the green semaphore button. You can no longer exit fullscreen as the green semaphore button gets disabled. |
Fix: #40994 |
Description of Change
This PR fixes this bug: #39833
An earlier PR (cc @codebytere) incorrectly disabled
NSWindowZoomButton
if the window was non-fullscreenable. However, if a macOS window is non-fullscreenable, the green zoom button turns into a maximize button (with a plus sign instead of the full-screen arrows), so it is still useful and shouldn't be disabled.Here I'm enabling the button if the window is fullscreenable OR (resizable AND maximizable). I'm also ensuring that this invariant holds whenever any of these 3 flags change (i.e. fullscreenable, resizable, maximizable).
Checklist
npm test
passesRelease Notes
Notes: Fixed the enabled/disabled behavior of the maximize/fullscreen button of macOS windows