Skip to content

fix: WCO pressed background state updates - #34771

Merged
codebytere merged 1 commit into
mainfrom
wco-background-button-painting
Jul 7, 2022
Merged

fix: WCO pressed background state updates#34771
codebytere merged 1 commit into
mainfrom
wco-background-button-painting

Conversation

@codebytere

Copy link
Copy Markdown
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 recently 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 recently label Jun 29, 2022
@codebytere

Copy link
Copy Markdown
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
Copy Markdown
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

release-clerk Bot commented Jul 7, 2022

Copy link
Copy Markdown

Release Notes Persisted

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

@trop

trop Bot commented Jul 7, 2022

Copy link
Copy Markdown
Contributor

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

@trop

trop Bot commented Jul 7, 2022

Copy link
Copy Markdown
Contributor

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

@trop

trop Bot commented Jul 7, 2022

Copy link
Copy Markdown
Contributor

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

@trop

trop Bot commented Jul 7, 2022

Copy link
Copy Markdown
Contributor

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