summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormirandac@chromium.org <mirandac@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-02-18 14:15:52 +0000
committermirandac@chromium.org <mirandac@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-02-18 14:15:52 +0000
commitde9550d4a42650d0c40c2c554372bcc9de626c9d (patch)
treecf697a05107b19ec33d2275bbdaed56ef362568e
parent62d46296e3e7b62eec0fb4f16d6cfbe95b59fe21 (diff)
downloadchromium_src-de9550d4a42650d0c40c2c554372bcc9de626c9d.zip
chromium_src-de9550d4a42650d0c40c2c554372bcc9de626c9d.tar.gz
chromium_src-de9550d4a42650d0c40c2c554372bcc9de626c9d.tar.bz2
Revert 75347 - Revert 75306 - 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.
DesktopNotification tests failing on win full - speculative revert since this is the only CL in the range that seems possibly related. BUG=none TEST=frames behave normally in Aero mode, when activated and deactivated. Review URL: http://codereview.chromium.org/6507044 TBR=mirandac@chromium.org Review URL: http://codereview.chromium.org/6546006 TBR=mattm@chromium.org Review URL: http://codereview.chromium.org/6541023 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@75389 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--views/window/window_win.cc23
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