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

chore: cherry-pick 2ed58f4 from chromium #33109

Merged

Conversation

RaisinTen
Copy link
Member

@RaisinTen RaisinTen commented Mar 1, 2022

Description of Change


Subject: [PATCH] Remove incorrect width/height adjustments

In late 2016 a change which fixed some problems around window sizing
when attaching or detaching additional displays was landed, which fixed
some genuine bugs. Unfortunately it included a subtraction of 1 from the
width and height of the Chrome window. I couldn't find any discussion of
this size adjustment and I think that it was just a misunderstanding of
how window rectangles work (inclusive versus exclusive extents).

This size adjustment causes non-maximized Chrome windows to shrink every
time a monitor is added or removed. The problematic commit was found
by the bug-filer through a bisect of more than four years of Chrome
history - I'm just landing the fix that they suggested.

Bug: 1300415
Change-Id: Ief124f584a91aa9cc3f10704b0cc1e83356dea5b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3492658
Reviewed-by: Allen Bauer kylixrd@chromium.org
Commit-Queue: Bruce Dawson brucedawson@chromium.org
Cr-Commit-Position: refs/heads/main@{#975872}


Refs: https://chromium-review.googlesource.com/c/chromium/src/+/3492658
Fixes: #33049
Signed-off-by: Darshan Sen raisinten@gmail.com

Release Notes

Notes: Fixes an issue where adding/removing display changes the BrowserWindow size.

@RaisinTen RaisinTen requested review from a team as code owners March 1, 2022 07:29
@electron-cation electron-cation bot added the new-pr 🌱 PR opened in the last 24 hours label Mar 1, 2022
@RaisinTen RaisinTen force-pushed the remove-incorrect-window-bound-adjustments branch from 491fa87 to 2e3afb7 Compare March 1, 2022 08:36
@RaisinTen RaisinTen force-pushed the remove-incorrect-window-bound-adjustments branch from 2e3afb7 to e054ed9 Compare March 1, 2022 09:13
@electron-cation electron-cation bot removed the new-pr 🌱 PR opened in the last 24 hours label Mar 8, 2022
@dsanders11 dsanders11 added semver/patch backwards-compatible bug fixes target/14-x-y labels Mar 9, 2022
Copy link
Member

@ckerr ckerr left a comment

Choose a reason for hiding this comment

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

LGTM. This has one upstream approval already so we may wind up backing this out of main after a future roll, but landing in main here lets trop do its thing

@dsanders11
Copy link
Member

@ckerr, it's been merged upstream, so yea, it will come out in a future roll. For context, I was the upstream issue reporter and ran it down. I also liberally applied the target labels here, so feel free to trim them back, but it feels low risk and isolated to backport. 🙂

@ckerr ckerr merged commit bbb7988 into electron:main Mar 11, 2022
@release-clerk
Copy link

release-clerk bot commented Mar 11, 2022

Release Notes Persisted

Fixes an issue where adding/removing display changes the BrowserWindow size.

trop bot pushed a commit that referenced this pull request Mar 11, 2022
Refs: https://chromium-review.googlesource.com/c/chromium/src/+/3492658
Fixes: #33049
Signed-off-by: Darshan Sen <raisinten@gmail.com>

Co-authored-by: Charles Kerr <charles@charleskerr.com>
trop bot pushed a commit that referenced this pull request Mar 11, 2022
Refs: https://chromium-review.googlesource.com/c/chromium/src/+/3492658
Fixes: #33049
Signed-off-by: Darshan Sen <raisinten@gmail.com>

Co-authored-by: Charles Kerr <charles@charleskerr.com>
@trop
Copy link
Contributor

trop bot commented Mar 11, 2022

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

@trop trop bot removed the target/14-x-y label Mar 11, 2022
trop bot pushed a commit that referenced this pull request Mar 11, 2022
Refs: https://chromium-review.googlesource.com/c/chromium/src/+/3492658
Fixes: #33049
Signed-off-by: Darshan Sen <raisinten@gmail.com>

Co-authored-by: Charles Kerr <charles@charleskerr.com>
trop bot pushed a commit that referenced this pull request Mar 11, 2022
Refs: https://chromium-review.googlesource.com/c/chromium/src/+/3492658
Fixes: #33049
Signed-off-by: Darshan Sen <raisinten@gmail.com>

Co-authored-by: Charles Kerr <charles@charleskerr.com>
trop bot pushed a commit that referenced this pull request Mar 11, 2022
Refs: https://chromium-review.googlesource.com/c/chromium/src/+/3492658
Fixes: #33049
Signed-off-by: Darshan Sen <raisinten@gmail.com>

Co-authored-by: Charles Kerr <charles@charleskerr.com>
@trop
Copy link
Contributor

trop bot commented Mar 11, 2022

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

@trop
Copy link
Contributor

trop bot commented Mar 11, 2022

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

@trop
Copy link
Contributor

trop bot commented Mar 11, 2022

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

@RaisinTen RaisinTen deleted the remove-incorrect-window-bound-adjustments branch March 12, 2022 00:58
jkleinsc pushed a commit that referenced this pull request Mar 16, 2022
* chore: cherry-pick 2ed58f4 from chromium (#33109)

Refs: https://chromium-review.googlesource.com/c/chromium/src/+/3492658
Fixes: #33049
Signed-off-by: Darshan Sen <raisinten@gmail.com>

Co-authored-by: Charles Kerr <charles@charleskerr.com>

* chore: update patches

Co-authored-by: Darshan Sen <raisinten@gmail.com>
Co-authored-by: Charles Kerr <charles@charleskerr.com>
Co-authored-by: PatchUp <73610968+patchup[bot]@users.noreply.github.com>
jkleinsc pushed a commit that referenced this pull request Mar 16, 2022
Refs: https://chromium-review.googlesource.com/c/chromium/src/+/3492658
Fixes: #33049
Signed-off-by: Darshan Sen <raisinten@gmail.com>

Co-authored-by: Charles Kerr <charles@charleskerr.com>
jkleinsc pushed a commit that referenced this pull request Mar 16, 2022
Refs: https://chromium-review.googlesource.com/c/chromium/src/+/3492658
Fixes: #33049
Signed-off-by: Darshan Sen <raisinten@gmail.com>

Co-authored-by: Charles Kerr <charles@charleskerr.com>

Co-authored-by: Darshan Sen <raisinten@gmail.com>
Co-authored-by: Charles Kerr <charles@charleskerr.com>
zcbenz pushed a commit that referenced this pull request Mar 21, 2022
Refs: https://chromium-review.googlesource.com/c/chromium/src/+/3492658
Fixes: #33049
Signed-off-by: Darshan Sen <raisinten@gmail.com>

Co-authored-by: Charles Kerr <charles@charleskerr.com>

Co-authored-by: Darshan Sen <raisinten@gmail.com>
Co-authored-by: Charles Kerr <charles@charleskerr.com>
zcbenz added a commit that referenced this pull request Mar 21, 2022
* chore: cherry-pick 2ed58f4 from chromium (#33109)

Refs: https://chromium-review.googlesource.com/c/chromium/src/+/3492658
Fixes: #33049
Signed-off-by: Darshan Sen <raisinten@gmail.com>

Co-authored-by: Charles Kerr <charles@charleskerr.com>

* chore: update patches

Co-authored-by: Darshan Sen <raisinten@gmail.com>
Co-authored-by: Charles Kerr <charles@charleskerr.com>
Co-authored-by: Cheng Zhao <zcbenz@gmail.com>
Co-authored-by: PatchUp <73610968+patchup[bot]@users.noreply.github.com>
@trop trop bot added the merged/17-x-y label Mar 21, 2022
zcbenz pushed a commit that referenced this pull request Mar 21, 2022
* chore: cherry-pick 2ed58f4 from chromium (#33109)

Refs: https://chromium-review.googlesource.com/c/chromium/src/+/3492658
Fixes: #33049
Signed-off-by: Darshan Sen <raisinten@gmail.com>

Co-authored-by: Charles Kerr <charles@charleskerr.com>

* Trigger Build

* chore: update patches

Co-authored-by: Darshan Sen <raisinten@gmail.com>
Co-authored-by: Charles Kerr <charles@charleskerr.com>
Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>
Co-authored-by: PatchUp <73610968+patchup[bot]@users.noreply.github.com>
@trop trop bot removed the in-flight/17-x-y label Mar 21, 2022
bavulapati pushed a commit to bavulapati/electron that referenced this pull request Apr 29, 2022
Refs: https://chromium-review.googlesource.com/c/chromium/src/+/3492658
Fixes: electron#33049
Signed-off-by: Darshan Sen <raisinten@gmail.com>

Co-authored-by: Charles Kerr <charles@charleskerr.com>
khalwa pushed a commit to solarwindscloud/electron that referenced this pull request Feb 22, 2023
Refs: https://chromium-review.googlesource.com/c/chromium/src/+/3492658
Fixes: electron#33049
Signed-off-by: Darshan Sen <raisinten@gmail.com>

Co-authored-by: Charles Kerr <charles@charleskerr.com>
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]: Adding/Removing Display Changes Window Size
3 participants