diff options
author | mirandac@chromium.org <mirandac@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-02-17 21:38:37 +0000 |
---|---|---|
committer | mirandac@chromium.org <mirandac@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-02-17 21:38:37 +0000 |
commit | 12741cd6a3858e184e47bb38226a5fb3ba56069e (patch) | |
tree | 0e5f82e41c46bd117446537bc96a7272c92afd40 /views/window | |
parent | 75a26d89c3b7517f2fbd5b67e21cb35185f1994f (diff) | |
download | chromium_src-12741cd6a3858e184e47bb38226a5fb3ba56069e.zip chromium_src-12741cd6a3858e184e47bb38226a5fb3ba56069e.tar.gz chromium_src-12741cd6a3858e184e47bb38226a5fb3ba56069e.tar.bz2 |
Force native frames to repaint when OnNCActivate is called. With a profile menu button added to the GlassBrowserFrameView, failure to trigger the frame repaint means that the button will remain in the active state even when the frame has been deactivated.
BUG=none
TEST=frames behave normally in Aero mode, when activated and deactivated.
Review URL: http://codereview.chromium.org/6507044
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@75306 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'views/window')
-rw-r--r-- | views/window/window_win.cc | 23 |
1 files changed, 11 insertions, 12 deletions
diff --git a/views/window/window_win.cc b/views/window/window_win.cc index 83ad009..be578834 100644 --- a/views/window/window_win.cc +++ b/views/window/window_win.cc @@ -854,18 +854,17 @@ void WindowWin::OnMouseLeave() { LRESULT WindowWin::OnNCActivate(BOOL active) { is_active_ = !!active; - // 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()); - } + // 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 active again, we should be allowed to render as inactive, so |