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

Unified Diff: views/window/window_win.cc

Issue 6546006: Revert 75306 - Force native frames to repaint when OnNCActivate is called. Wi... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 10 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: views/window/window_win.cc
===================================================================
--- views/window/window_win.cc (revision 75346)
+++ views/window/window_win.cc (working copy)
@@ -854,17 +854,18 @@
LRESULT WindowWin::OnNCActivate(BOOL active) {
is_active_ = !!active;
- // We need to force a synchronous repaint, otherwise we'll be left in the
- // wrong activation state until something else causes a repaint later.
- // Both the native and non-native frames may render activation-state
- // dependent UI.
- // We can get WM_NCACTIVATE before we're actually visible. If we're not
- // visible, no need to paint.
- if (IsWindowVisible(GetNativeView())) {
- non_client_view_->SchedulePaint();
- // We need to force a paint now, as a user dragging a window will block
- // painting operations while the move is in progress.
- PaintNow(root_view_->GetScheduledPaintRect());
+ // If we're not using the native frame, we need to force a synchronous repaint
+ // otherwise we'll be left in the wrong activation state until something else
+ // causes a repaint later.
+ if (!non_client_view_->UseNativeFrame()) {
+ // We can get WM_NCACTIVATE before we're actually visible. If we're not
+ // visible, no need to paint.
+ if (IsWindowVisible(GetNativeView())) {
+ non_client_view_->SchedulePaint();
+ // We need to force a paint now, as a user dragging a window will block
+ // painting operations while the move is in progress.
+ PaintNow(root_view_->GetScheduledPaintRect());
+ }
}
// If we're active again, we should be allowed to render as inactive, so
« 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