Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(277)

Issue 59043012: Get rid of the 1-pixel client inset hack. (Closed)

Created:
7 years, 1 month ago by zturner
Modified:
7 years, 1 month ago
CC:
chromium-reviews, tfarina, cpu_(ooo_6.6-7.5), ananta, msw
Visibility:
Public.

Description

Get rid of the 1-pixel client inset hack. This patch attempts to fix various graphical glitches and corruption once and for all. The root of all these issues is the 1-pixel bottom client inset hack, so this patch aims to replace that hack with a (hopefully) less onerous hack. Prior to this patch, there was a comment indicating that before changing the frame type we must hide the window (and then show the window after the frame type is changed) or else the client area will paint black. However, no code was present to actually do this. The original comment also indicated that this was not necessary for chrome theme changes, but rather only WM_DWMCOMPOSITIONCHANGED messages, but testing showed that this is not the case, and it is in fact required for both cases. Additionally, after changing the frame type, it is required to call SetWindowPos() with SWP_FRAMECHANGED in order to notify windows of the change. BUG=312535, 311405 TEST= Classic -> Aero Test (Win7 only) 0. Shutdown Chrome 1. Set a Windows 7 Basic Theme 2. Start Chrome 3. Change to Windows 7 Aero Theme 4. Observe correct rendering of browser frame Aero -> Classic Test (Win7 only) 0. Shutdown Chrome 1. Set a Windows 7 Aero Theme 2. Start Chrome 3. Change to Windows 7 Basic Theme 4. Observe correct rendering of browser frame Chrome Theme Test (Win7 w/ Aero Theme, Win8, Win8.1) 1. Hotdog -> Settings -> Reset to Default Theme 2. Close Chrome 3. Start Chrome 4. Install Brushed Theme https://chrome.google.com/webstore/detail/brushed/bfjgbcjfpbbfepcccpaffkjofcmglifg?hl=en 5. Close Chrome 6. Start Chrome 7. Hotdog -> Settings -> Reset to Default Theme 8. Observe correct rendering of browser frame Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=234386

Patch Set 1 #

Patch Set 2 : Add a call to UpdateWindow after hide/reshow. #

Patch Set 3 : Remove comment about issue still persisting, since it appears fixed. #

Patch Set 4 : Re-add comment about remaining issue. #

Total comments: 1

Patch Set 5 : Fix the black title bar on classic -> glass theme change. #

Patch Set 6 : Fix black title bar on classic -> glass theme change. #

Total comments: 1

Patch Set 7 : Rebase to ToT #

Total comments: 4
Unified diffs Side-by-side diffs Delta from patch set Stats (+30 lines, -73 lines) Patch
M ui/views/widget/desktop_aura/desktop_root_window_host_win.cc View 1 2 3 4 5 6 2 chunks +2 lines, -0 lines 0 comments Download
M ui/views/win/hwnd_message_handler.h View 1 1 chunk +1 line, -1 line 0 comments Download
M ui/views/win/hwnd_message_handler.cc View 1 2 3 4 9 chunks +27 lines, -72 lines 4 comments Download

Messages

Total messages: 19 (0 generated)
zturner
Adding both sky and ben, since ben was the original author of the 1-pixel inset ...
7 years, 1 month ago (2013-11-07 01:06:07 UTC) #1
Ben Goodger (Google)
It's not just installing/resetting theme.. did you try doing this across maximized/restore transitions, also resizing ...
7 years, 1 month ago (2013-11-07 02:46:16 UTC) #2
zturner
On 2013/11/07 02:46:16, Ben Goodger (Google) wrote: > It's not just installing/resetting theme.. did you ...
7 years, 1 month ago (2013-11-07 04:03:14 UTC) #3
zturner
On 2013/11/07 04:03:14, zturner wrote: > On 2013/11/07 02:46:16, Ben Goodger (Google) wrote: > > ...
7 years, 1 month ago (2013-11-07 04:03:58 UTC) #4
zturner
+gab, msw to cc so they can test patch. This fixes an accidental introduction of ...
7 years, 1 month ago (2013-11-07 21:23:15 UTC) #5
zturner
After further testing the classic -> glass windows theme issue persists, but only with a ...
7 years, 1 month ago (2013-11-08 00:49:45 UTC) #6
gab
I tested this CL and the flow which I think was causing the black strips ...
7 years, 1 month ago (2013-11-08 15:28:31 UTC) #7
jbauman
https://codereview.chromium.org/59043012/diff/170001/ui/views/win/hwnd_message_handler.cc File ui/views/win/hwnd_message_handler.cc (right): https://codereview.chromium.org/59043012/diff/170001/ui/views/win/hwnd_message_handler.cc#newcode796 ui/views/win/hwnd_message_handler.cc:796: // will still be black after switching from Win7 ...
7 years, 1 month ago (2013-11-08 21:38:25 UTC) #8
zturner
On 2013/11/08 21:38:25, jbauman wrote: > https://codereview.chromium.org/59043012/diff/170001/ui/views/win/hwnd_message_handler.cc > File ui/views/win/hwnd_message_handler.cc (right): > > https://codereview.chromium.org/59043012/diff/170001/ui/views/win/hwnd_message_handler.cc#newcode796 > ...
7 years, 1 month ago (2013-11-09 00:16:42 UTC) #9
jbauman
On 2013/11/09 00:16:42, zturner wrote: > On 2013/11/08 21:38:25, jbauman wrote: > > > https://codereview.chromium.org/59043012/diff/170001/ui/views/win/hwnd_message_handler.cc ...
7 years, 1 month ago (2013-11-09 00:22:23 UTC) #10
zturner
Thanks to jbauman, figured out how to fix the black bar on classic -> glass. ...
7 years, 1 month ago (2013-11-09 02:46:28 UTC) #11
zturner
On 2013/11/09 02:46:28, zturner wrote: > Thanks to jbauman, figured out how to fix the ...
7 years, 1 month ago (2013-11-11 19:55:29 UTC) #12
Ben Goodger (Google)
This is really cool. LGTM. https://codereview.chromium.org/59043012/diff/270001/ui/views/win/hwnd_message_handler.cc File ui/views/win/hwnd_message_handler.cc (right): https://codereview.chromium.org/59043012/diff/270001/ui/views/win/hwnd_message_handler.cc#newcode1093 ui/views/win/hwnd_message_handler.cc:1093: *insets = gfx::Insets(0, 0, ...
7 years, 1 month ago (2013-11-11 20:30:07 UTC) #13
jbauman
lgtm
7 years, 1 month ago (2013-11-11 22:02:50 UTC) #14
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/zturner@chromium.org/59043012/370001
7 years, 1 month ago (2013-11-12 01:11:02 UTC) #15
Peter Kasting
Drive-by. No need to get an LGTM from me. I have been seeing lots of ...
7 years, 1 month ago (2013-11-12 01:47:02 UTC) #16
zturner
On 2013/11/12 01:47:02, Peter Kasting wrote: > Drive-by. No need to get an LGTM from ...
7 years, 1 month ago (2013-11-12 01:54:24 UTC) #17
commit-bot: I haz the power
Change committed as 234386
7 years, 1 month ago (2013-11-12 02:54:57 UTC) #18
scottmg
7 years, 1 month ago (2013-11-12 03:57:16 UTC) #19
Message was sent while issue was closed.
On 2013/11/12 02:54:57, I haz the power (commit-bot) wrote:
> Change committed as 234386

WOOHOO! Really hope this one sticks.

Powered by Google App Engine
This is Rietveld 408576698