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

Unified Diff: ui/views/win/hwnd_message_handler.cc

Issue 440793002: Fix the painting problems seen in the tabstrip when switching from a theme to glass on Windows. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/win/hwnd_message_handler.cc
diff --git a/ui/views/win/hwnd_message_handler.cc b/ui/views/win/hwnd_message_handler.cc
index 0e513db03d740ecc6d42ab23db1240f497c686eb..52d64131d8fb564a600083b240491202586c3e27 100644
--- a/ui/views/win/hwnd_message_handler.cc
+++ b/ui/views/win/hwnd_message_handler.cc
@@ -817,7 +817,11 @@ void HWNDMessageHandler::FrameTypeChanged() {
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);
+ base::MessageLoop::current()->PostDelayedTask(
+ FROM_HERE,
+ base::Bind(base::IgnoreResult(&::InvalidateRect), hwnd(),
+ reinterpret_cast<const RECT*>(NULL), FALSE),
+ base::TimeDelta::FromMilliseconds(500));
ananta 2014/08/05 00:24:03 It now appears that the bug was never fixed. We ne
sky 2014/08/05 01:30:56 This is a total hack. Why do we need to delay? Als
}
// WM_DWMCOMPOSITIONCHANGED is only sent to top level windows, however we want
@@ -841,7 +845,7 @@ void HWNDMessageHandler::SchedulePaintInRect(const gfx::Rect& rect) {
waiting_for_redraw_layered_window_contents_ = true;
base::MessageLoop::current()->PostTask(
FROM_HERE,
- base::Bind(&HWNDMessageHandler::RedrawLayeredWindowContents,
+ base::Bind(base::IgnoreResult(&HWNDMessageHandler::RedrawLayeredWindowContents),
weak_factory_.GetWeakPtr()));
}
} else {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698