Skip to content

fix: window button visibility fullscreen interaction - #34530

Merged
zcbenz merged 1 commit into
mainfrom
fix-window-buttons-fullscreen
Jun 21, 2022
Merged

fix: window button visibility fullscreen interaction#34530
zcbenz merged 1 commit into
mainfrom
fix-window-buttons-fullscreen

Conversation

@codebytere

Copy link
Copy Markdown
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 recently label Jun 13, 2022
Comment thread shell/browser/native_window_mac.mm Outdated
@electron-cation electron-cation Bot removed the new-pr 🌱 PR opened recently label Jun 14, 2022
@codebytere
codebytere force-pushed the fix-window-buttons-fullscreen branch from 073ebe7 to 10b3345 Compare June 16, 2022 10:54

@zcbenz zcbenz left a comment

Copy link
Copy Markdown
Contributor

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

release-clerk Bot commented Jun 21, 2022

Copy link
Copy Markdown

Release Notes Persisted

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

@trop

trop Bot commented Jun 21, 2022

Copy link
Copy Markdown
Contributor

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

@trop

trop Bot commented Jun 21, 2022

Copy link
Copy Markdown
Contributor

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

@trop

trop Bot commented Jun 21, 2022

Copy link
Copy Markdown
Contributor

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

schetle pushed a commit to schetle/electron that referenced this pull request Nov 3, 2022
khalwa pushed a commit to solarwindscloud/electron that referenced this pull request Feb 22, 2023
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