8000 fix: move window buttons in-place on macOS by zcbenz · Pull Request #30322 · electron/electron · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

fix: move window buttons in-place on macOS #30322

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

Merged
merged 1 commit into from
Aug 4, 2021
Merged

Conversation

zcbenz
Copy link
Contributor
@zcbenz zcbenz commented Jul 29, 2021

Description of Change

Close #30039.

The refactor #27489 put window buttons in a custom view to make it possible to dynamically control position and visibility of window buttons. With this approach macOS no longer synchronize window states with the window buttons, and we have been doing manual updates to work around it.

However for issue #30039, I find no way to fix it without using private APIs. So in this PR I removed the custom view, and controlled the window buttons without changing their view hierarchy instead. The downside of this approach is, we have to deal with internal view structure of NSWindow, but this is what we used to do before #27489 anyway.

This PR does not remove the benefits brought by #27489, and makes code of NativeWindowMac cleaner.

Release Notes

Notes: Fix documentEdited status not updating close button for frameless window on macOS.

@zcbenz zcbenz added semver/patch backwards-compatible bug fixes target/13-x-y labels Jul 29, 2021
@zcbenz zcbenz requested review from deepak1556 and codebytere July 29, 2021 10:49
@electron-cation electron-cation bot added new-pr 🌱 PR opened recently and removed new-pr 🌱 PR opened recently labels Jul 29, 2021
@zcbenz zcbenz merged commit 97929ea into main Aug 4, 2021
@zcbenz zcbenz deleted the window-buttons-proxy branch August 4, 2021 00:31
@release-clerk
Copy link
release-clerk bot commented Aug 4, 2021

Release Notes Persisted

Fix documentEdited status not updating close button for frameless window on macOS.

@trop
Copy link
Contributor
trop bot commented Aug 4, 2021

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

@trop
Copy link
Contributor
trop bot commented Aug 4, 2021

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

@trop
Copy link
Contributor
trop bot commented Aug 4, 2021

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

@trop
Copy link
Contributor
trop bot commented Aug 4, 2021

@zcbenz has manually backported this PR to "13-x-y", please check out #30393

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]: Using titleBarStyle to anything except default breaks the documentEdited status indicator on macOS
2 participants
0