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: WCO pressed background state updates #34771

Merged
merged 1 commit into from Jul 7, 2022

Conversation

codebytere
Copy link
Member

Description of Change

Closes #34763.

When a window with WCO is restored after the minimize button is clicked, the button was left in the STATE_HOVERED state. This meant that when the user restored (unminimized) the window, the button was incorrectly left painted as though the user was still hovered over it, and could only fix this by once again hovering over the button and then moving off of it. This issue is fixed by ensuring that windows controls are reset when the window is restored, since the buttons could neither be pressed or hovered over as that is occurring by the nature of the event taking place.

Tested by adding:

titleBarStyle: 'hidden',
    titleBarOverlay: {
      color: '#2f3241',
      symbolColor: '#74b1be',
      height: 60
    }

to the BrowserWindow ctor options of the default Fiddle.

Checklist

Release Notes

Notes: Fixed an issue where the minimize button with WCO enabled would incorrectly be highlighted in some cases.

@codebytere codebytere added semver/patch backwards-compatible bug fixes target/19-x-y labels Jun 28, 2022
@electron-cation electron-cation bot added the new-pr 🌱 PR opened in the last 24 hours label Jun 28, 2022
@codebytere codebytere force-pushed the wco-background-button-painting branch from 4981b20 to cfee973 Compare June 28, 2022 13:57
@codebytere codebytere force-pushed the wco-background-button-painting branch from 53d5a90 to 6e94112 Compare June 29, 2022 11:18
@electron-cation electron-cation bot removed the new-pr 🌱 PR opened in the last 24 hours label Jun 29, 2022
@codebytere
Copy link
Member Author

Looks like a valid test failure - i'm looking into it!

@codebytere codebytere force-pushed the wco-background-button-painting branch from 6e94112 to a9d4023 Compare July 7, 2022 07:45
@codebytere
Copy link
Member Author

@clavin @mlaurencin tests fixed!

@codebytere codebytere requested a review from jkleinsc July 7, 2022 09:33
@codebytere codebytere merged commit 7ec8858 into main Jul 7, 2022
@codebytere codebytere deleted the wco-background-button-painting branch July 7, 2022 15:17
@release-clerk
Copy link

release-clerk bot commented Jul 7, 2022

Release Notes Persisted

Fixed an issue where the minimize button with WCO enabled would incorrectly be highlighted in some cases.

@trop
Copy link
Contributor

trop bot commented Jul 7, 2022

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

@trop
Copy link
Contributor

trop bot commented Jul 7, 2022

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

@trop
Copy link
Contributor

trop bot commented Jul 7, 2022

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

@trop
Copy link
Contributor

trop bot commented Jul 7, 2022

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

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]: Overlay's minimize button stays in hovered/focused state after restoring
4 participants