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: recalibrate simpleFullscreen when display metrics change #28150

Merged
merged 4 commits into from
Mar 16, 2021

Conversation

codebytere
Copy link
Member

@codebytere codebytere commented Mar 12, 2021

Description of Change

Closes #15494.

Overrides OnDisplayMetricsChanged in NativeWindowMac so that when display metrics change and the BrowserWindow is in simpleFullscreen mode, the frame is recalibrated for the new bounds.

Tested with https://gist.github.com/bpasero/e4013ea83033a8c231f58f94c0df57c3.

cc @bpasero

Checklist

Release Notes

Notes: Fixed an issue where windows in simpleFullscreen mode were not properly resizing when display metrics changed.

@codebytere codebytere added semver/patch backwards-compatible bug fixes target/11-x-y labels Mar 12, 2021
@electron-cation electron-cation bot added the new-pr 🌱 PR opened in the last 24 hours label Mar 12, 2021
@electron electron deleted a comment from jho293 Mar 12, 2021
@deepak1556
Copy link
Member

Compilation errors on Linux needs fix, LGTM otherwise. Thanks!

@codebytere
Copy link
Member Author

@deepak1556 should be set to go!

Copy link
Member

@deepak1556 deepak1556 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM with style change.

shell/browser/native_window.h Outdated Show resolved Hide resolved
@codebytere codebytere force-pushed the update-simple-fs-display-metrics branch from 3c466ed to fc798ca Compare March 13, 2021 02:24
@electron-cation electron-cation bot removed the new-pr 🌱 PR opened in the last 24 hours label Mar 13, 2021
shell/browser/native_window_mac.mm Outdated Show resolved Hide resolved
shell/browser/native_window_mac.h Outdated Show resolved Hide resolved
shell/browser/native_window_mac.mm Outdated Show resolved Hide resolved
@codebytere codebytere requested a review from zcbenz March 15, 2021 07:28
@codebytere codebytere merged commit fdc2e2b into master Mar 16, 2021
@release-clerk
Copy link

release-clerk bot commented Mar 16, 2021

Release Notes Persisted

Fixed an issue where windows in simpleFullscreen mode were not properly resizing when display metrics changed.

@codebytere codebytere deleted the update-simple-fs-display-metrics branch March 16, 2021 09:42
@trop
Copy link
Contributor

trop bot commented Mar 16, 2021

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

@trop trop bot removed the target/12-x-y label Mar 16, 2021
@trop
Copy link
Contributor

trop bot commented Mar 16, 2021

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

@trop
Copy link
Contributor

trop bot commented Mar 16, 2021

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

mlaurencin pushed a commit that referenced this pull request Mar 18, 2021
* fix: recalibrate simpleFullscreen when display metrics change

* Address review feedback

* fix: compilation issues

* Address feedback from review
@trop
Copy link
Contributor

trop bot commented Apr 27, 2021

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

@trop
Copy link
Contributor

trop bot commented Apr 27, 2021

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

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.

Simple fullscreen: is not properly sizing the window when display metrics change
3 participants