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: window button visibility fullscreen interaction #34530

Merged
merged 1 commit into from Jun 21, 2022

Conversation

codebytere
Copy link
Member

Description of Change

Closes #34507.

Fixes an issue where calling w.setWindowButtonVisibility(true) immediately after exiting fullscreen fails to show window buttons. This was happening owing to a race condition due to the asynchronous nature of window.setFullscreen - our logic hides and then restores custom window buttons to prevent them jumping around. However, if w.setWindowButtonVisibility(true) is called after window.setFullscreen and the transition has not yet completed, then the window button won't get redrawn and this the buttons won't show up again. Fix this by ensuring that the buttons get redrawn appropriately in w.setWindowButtonVisibility.

Checklist

Release Notes

Notes: Fixes an issue where calling w.setWindowButtonVisibility(true) immediately after exiting fullscreen fails to show window buttons.

@codebytere codebytere added semver/patch backwards-compatible bug fixes target/18-x-y labels Jun 13, 2022
@electron-cation electron-cation bot added the new-pr 🌱 PR opened in the last 24 hours label Jun 13, 2022
@electron-cation electron-cation bot removed the new-pr 🌱 PR opened in the last 24 hours label Jun 14, 2022
@codebytere codebytere force-pushed the fix-window-buttons-fullscreen branch from 073ebe7 to 10b3345 Compare June 16, 2022 10:54
Copy link
Member

@zcbenz zcbenz left a comment

Choose a reason for hiding this comment

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

The BrowserWindow.setWindowButtonVisibility() tests are failing.

@codebytere codebytere requested a review from zcbenz June 20, 2022 11:43
@codebytere codebytere force-pushed the fix-window-buttons-fullscreen branch from 10b3345 to c0da80a Compare June 20, 2022 11:43
@zcbenz zcbenz merged commit 530a022 into main Jun 21, 2022
@zcbenz zcbenz deleted the fix-window-buttons-fullscreen branch June 21, 2022 07:35
@release-clerk
Copy link

release-clerk bot commented Jun 21, 2022

Release Notes Persisted

Fixes an issue where calling w.setWindowButtonVisibility(true) immediately after exiting fullscreen fails to show window buttons.

@trop
Copy link
Contributor

trop bot commented Jun 21, 2022

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

@trop
Copy link
Contributor

trop bot commented Jun 21, 2022

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

@trop
Copy link
Contributor

trop bot commented Jun 21, 2022

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

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]: Traffic light display cannot be changed after certain operations
4 participants