-
Notifications
You must be signed in to change notification settings - Fork 16.2k
fix: persist maximizable state through theme change #22677
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
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.
Will the last line of NativeWindowMac::AddContentViewLayers()
cause state shear with maximizable_
having one value and NSWindowZoomButton another value?
// Some third-party macOS utilities check the zoom button's enabled state to
// determine whether to show custom UI on hover, so we disable it here to
// prevent them from doing so in a frameless app window.
[[window_ standardWindowButton:NSWindowZoomButton] setEnabled:NO];
f9ce28d
to
f64c453
Compare
f64c453
to
9de4eac
Compare
9de4eac
to
99dd878
Compare
99dd878
to
17af113
Compare
Release Notes Persisted
|
I have automatically backported this PR to "9-x-y", please check out #22724 |
Description of Change
(Partially) fixes #22646.
NSWindows reset their traffic light enabled states on redraw, which happens on theme changes (i.e changing from Light to Dark Mode) and so breaks old maximizable settings set by users. Luckily, we already hook into theme changes to reposition traffic lights, so this was a fairly straightforward fix in that we can use that function to persist maximizable state.
cc @MarshallOfSound @zcbenz
Checklist
npm test
passesRelease Notes
Notes: Fixed an issue where changing theme on macOS would break window maximizability state.