Fix a long standing painting problem seen in the tabstrip on Windows Desktop Chrome.
commit339f97c304fba1b6844590831a0f4f8cf7ad3c73
authorananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>
Wed, 20 Aug 2014 22:56:48 +0000 (20 22:56 +0000)
committerananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>
Wed, 20 Aug 2014 22:59:22 +0000 (20 22:59 +0000)
tree7cd4dcac37c67f11913cfc10f09f423935937154
parentd09f04b47ab0cc26089053bb2d9201a78746c7b6
Fix a long standing painting problem seen in the tabstrip on Windows Desktop Chrome.

The problem appears when we switch away from an installed theme to glass while in fullscreen mode. Debugging this revealed the following:-

1. Windows sends the WM_DWMNCRENDERINGCHANGED message when DWM
   NC rendering is enabled or disabled for a window. The wParam
   in the message indicates if NC rendering is enabled.

2. In fullscreen mode if we attempt to transition a window to
   DWM we get the above message with wParam as TRUE which
   indicates that DWM is enabled. However we eventually receive
   this message again with wParam as FALSE indicating that DWM
   is turned off for the window. Some windbg debugging revealed
   that there is a function in the themes dll which turns off
   DWM for fullscreen windows.

The painting problem occurs because we think we are in DWM and Windows does not.

Attempted fix is to delay the DWM portion of the themes change until the window comes out of fullscreen mode.

BUG=404564
R=sky@chromium.org

Review URL: https://codereview.chromium.org/484963002

Cr-Commit-Position: refs/heads/master@{#290941}
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@290941 0039d316-1c4b-4281-b951-d872f2087c98
ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc
ui/views/win/hwnd_message_handler.cc
ui/views/win/hwnd_message_handler.h