Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
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>
- Loading branch information
1 parent
1c8e9b3
commit bf5a0cd
Showing
2 changed files
with
40 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
39 changes: 39 additions & 0 deletions
39
patches/chromium/remove_incorrect_width_height_adjustments.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 | ||
From: Bruce Dawson <brucedawson@chromium.org> | ||
Date: Mon, 28 Feb 2022 19:07:41 +0000 | ||
Subject: 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} | ||
|
||
diff --git a/ui/views/win/hwnd_message_handler.cc b/ui/views/win/hwnd_message_handler.cc | ||
index 264a9109e42c23e9be6bf7269b3cfee2634b61e4..86f06d2a2c9588a2210a9f78f47e73f1b7c5e329 100644 | ||
--- a/ui/views/win/hwnd_message_handler.cc | ||
+++ b/ui/views/win/hwnd_message_handler.cc | ||
@@ -2834,8 +2834,8 @@ void HWNDMessageHandler::OnWindowPosChanging(WINDOWPOS* window_pos) { | ||
// (Win+Shift+Arrows). See crbug.com/656001. | ||
window_rect.left = window_pos->x; | ||
window_rect.top = window_pos->y; | ||
- window_rect.right = window_pos->x + window_pos->cx - 1; | ||
- window_rect.bottom = window_pos->y + window_pos->cy - 1; | ||
+ window_rect.right = window_pos->x + window_pos->cx; | ||
+ window_rect.bottom = window_pos->y + window_pos->cy; | ||
} | ||
|
||
HMONITOR monitor; |