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: maximize/unmaximize firing on linux #32441

Merged
merged 1 commit into from Jan 17, 2022
Merged

Conversation

codebytere
Copy link
Member

@codebytere codebytere commented Jan 12, 2022

Description of Change

Closes #28699.

Fixes an issue where the 'maximize' and 'unmaximize' events didn't fire properly on linux.

This was happening as a result of changes made in #27280 to address CL:2577887 and CL:2585750. In the resultant change, we assigned was_maximized_ at the top of WindowStateWatcher::OnEvent - given that this was being called in the function after the event had taken place, the previous value would match the current value using this logic and thus it would never be the case that is_minimized != was_minimized_ or is_maximized != was_maximized_ and thus the events would never fire.

Fix this by assigning was_minimized_ and was_maximized_ in places that properly allow the change to be reflected.

Tested with https://gist.github.com/Jelmerro/5a5a8b0cfcf69a24993b47bd7526d242

cc @dsanders11 since this should allow you to better test #32438

Checklist

Release Notes

Notes: Fixed an issue where the 'maximize' and 'unmaximize' events didn't fire properly on linux.

@codebytere codebytere added semver/patch backwards-compatible bug fixes target/14-x-y labels Jan 12, 2022
@electron-cation electron-cation bot added the new-pr 🌱 PR opened in the last 24 hours label Jan 12, 2022
@electron-cation electron-cation bot removed the new-pr 🌱 PR opened in the last 24 hours label Jan 13, 2022
@zcbenz zcbenz merged commit 2a8d49a into main Jan 17, 2022
@zcbenz zcbenz deleted the fix-linux-max-unmax-firing branch January 17, 2022 07:46
@release-clerk
Copy link

release-clerk bot commented Jan 17, 2022

Release Notes Persisted

Fixed an issue where the 'maximize' and 'unmaximize' events didn't fire properly on linux.

@trop
Copy link
Contributor

trop bot commented Jan 17, 2022

I was unable to backport this PR to "14-x-y" cleanly;
you will need to perform this backport manually.

@trop
Copy link
Contributor

trop bot commented Jan 17, 2022

I was unable to backport this PR to "15-x-y" cleanly;
you will need to perform this backport manually.

@trop
Copy link
Contributor

trop bot commented Jan 17, 2022

I was unable to backport this PR to "16-x-y" cleanly;
you will need to perform this backport manually.

@trop
Copy link
Contributor

trop bot commented Jan 17, 2022

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

@trop
Copy link
Contributor

trop bot commented Jan 17, 2022

@codebytere has manually backported this PR to "16-x-y", please check out #32497

@trop
Copy link
Contributor

trop bot commented Jan 17, 2022

@codebytere has manually backported this PR to "15-x-y", please check out #32498

@trop
Copy link
Contributor

trop bot commented Jan 17, 2022

@codebytere has manually backported this PR to "14-x-y", please check out #32499

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]: maximize and unmaximize events don't fire for browserwindow
3 participants