Commit f7209be6 authored by ananta@chromium.org's avatar ananta@chromium.org

Fix the painting problems seen in the tabstrip when switching from a theme to glass on Windows.

This regressed with the LegacyRenderWidgetHostHWND. It looks like the reason is that the LegacyRenderWidgetHostHWND eats
paint messages which would previously cause an invalidation in the parent when bounds change, etc.

Proposed fix is to pass SWP_NOREDRAW to the SetWindowPos calls used by the LegacyRenderWidgetHostHWND class.

BUG=388690
R=sky

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@287994 0039d316-1c4b-4281-b951-d872f2087c98
parent e018a29e
......@@ -82,7 +82,8 @@ void LegacyRenderWidgetHostHWND::Hide() {
void LegacyRenderWidgetHostHWND::SetBounds(const gfx::Rect& bounds) {
gfx::Rect bounds_in_pixel = gfx::win::DIPToScreenRect(bounds);
::SetWindowPos(hwnd(), NULL, bounds_in_pixel.x(), bounds_in_pixel.y(),
bounds_in_pixel.width(), bounds_in_pixel.height(), 0);
bounds_in_pixel.width(), bounds_in_pixel.height(),
SWP_NOREDRAW);
}
void LegacyRenderWidgetHostHWND::OnFinalMessage(HWND hwnd) {
......
......@@ -135,7 +135,6 @@ class CONTENT_EXPORT LegacyRenderWidgetHostHWND
LRESULT OnSetCursor(UINT message, WPARAM w_param, LPARAM l_param);
LRESULT OnNCCalcSize(UINT message, WPARAM w_param, LPARAM l_param);
LRESULT OnSize(UINT message, WPARAM w_param, LPARAM l_param);
LRESULT OnSysCommand(UINT message, WPARAM w_param, LPARAM l_param);
base::win::ScopedComPtr<IAccessible> window_accessible_;
......
......@@ -815,9 +815,6 @@ void HWNDMessageHandler::FrameTypeChanged() {
UINT flags = SWP_NOMOVE | SWP_NOSIZE | SWP_NOZORDER;
SetWindowPos(hwnd(), NULL, 0, 0, 0, 0, flags | SWP_HIDEWINDOW);
SetWindowPos(hwnd(), NULL, 0, 0, 0, 0, flags | SWP_SHOWWINDOW);
// Invalidate the window to force a paint. There may be child windows which
// could resize in this context. Don't paint right away.
::InvalidateRect(hwnd(), NULL, FALSE);
}
// WM_DWMCOMPOSITIONCHANGED is only sent to top level windows, however we want
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment