Skip to content

chore: cherry-pick 2ed58f4 from chromium - #33109

Merged
ckerr merged 2 commits into
electron:mainfrom
RaisinTen:remove-incorrect-window-bound-adjustments
Mar 11, 2022
Merged

ckerr merged 2 commits into
electron:mainfrom
RaisinTen:remove-incorrect-window-bound-adjustments

Conversation

@RaisinTen

@RaisinTen RaisinTen commented Mar 1, 2022 •

Copy link
Copy Markdown
Contributor

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 [email protected]
Commit-Queue: Bruce Dawson [email protected]
Cr-Commit-Position: refs/heads/main@{#975872}


Refs: https://chromium-review.googlesource.com/c/chromium/src/+/3492658
Fixes: #33049
Signed-off-by: Darshan Sen [email protected]

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 recently 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 recently label Mar 8, 2022
@dsanders11 dsanders11 added semver/patch backwards-compatible bug fixes target/14-x-y labels Mar 9, 2022

@ckerr ckerr left a comment

Copy link
Copy Markdown
Member

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

release-clerk Bot commented Mar 11, 2022

Copy link
Copy Markdown

Release Notes Persisted

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

@trop

trop Bot commented Mar 11, 2022

Copy link
Copy Markdown
Contributor

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

@trop

trop Bot commented Mar 11, 2022

Copy link
Copy Markdown
Contributor

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

@trop

trop Bot commented Mar 11, 2022

Copy link
Copy Markdown
Contributor

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

@trop

trop Bot commented Mar 11, 2022

Copy link
Copy Markdown
Contributor

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 <[email protected]>

Co-authored-by: Charles Kerr <[email protected]>

* chore: update patches

Co-authored-by: Darshan Sen <[email protected]>
Co-authored-by: Charles Kerr <[email protected]>
Co-authored-by: PatchUp <73610968+patchup[bot]@users.noreply.github.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 <[email protected]>

Co-authored-by: Charles Kerr <[email protected]>

* chore: update patches

Co-authored-by: Darshan Sen <[email protected]>
Co-authored-by: Charles Kerr <[email protected]>
Co-authored-by: Cheng Zhao <[email protected]>
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 <[email protected]>

Co-authored-by: Charles Kerr <[email protected]>

* Trigger Build

* chore: update patches

Co-authored-by: Darshan Sen <[email protected]>
Co-authored-by: Charles Kerr <[email protected]>
Co-authored-by: John Kleinschmidt <[email protected]>
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
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