fix: window button visibility fullscreen interaction - #34530
Merged
Conversation
VerteDinde
approved these changes
Jun 13, 2022
ckerr
reviewed
Jun 14, 2022
zcbenz
approved these changes
Jun 16, 2022
codebytere
force-pushed
the
fix-window-buttons-fullscreen
branch
from
June 16, 2022 10:54
073ebe7 to
10b3345
Compare
zcbenz
suggested changes
Jun 20, 2022
zcbenz
left a comment
Contributor
There was a problem hiding this comment.
The BrowserWindow.setWindowButtonVisibility() tests are failing.
codebytere
force-pushed
the
fix-window-buttons-fullscreen
branch
from
June 20, 2022 11:43
10b3345 to
c0da80a
Compare
zcbenz
approved these changes
Jun 21, 2022
|
Release Notes Persisted
|
This was referenced Jun 21, 2022
Contributor
|
I have automatically backported this PR to "18-x-y", please check out #34673 |
Contributor
|
I have automatically backported this PR to "19-x-y", please check out #34674 |
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 ofwindow.setFullscreen- our logic hides and then restores custom window buttons to prevent them jumping around. However, ifw.setWindowButtonVisibility(true)is called afterwindow.setFullscreenand 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 inw.setWindowButtonVisibility.Checklist
npm testpassesRelease Notes
Notes: Fixes an issue where calling
w.setWindowButtonVisibility(true)immediately after exiting fullscreen fails to show window buttons.