summaryrefslogtreecommitdiffstats
path: root/views
diff options
context:
space:
mode:
authormattm@chromium.org <mattm@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-02-18 01:38:39 +0000
committermattm@chromium.org <mattm@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-02-18 01:38:39 +0000
commitbb86751999f897dbdee3ef86488d37e20c95d5c9 (patch)
tree5ed4548614ca40573ac41fc3d38485ea0b14a848 /views
parentbe8ed8c16785252f73e20e73f6d3177fee50bbb4 (diff)
downloadchromium_src-bb86751999f897dbdee3ef86488d37e20c95d5c9.zip
chromium_src-bb86751999f897dbdee3ef86488d37e20c95d5c9.tar.gz
chromium_src-bb86751999f897dbdee3ef86488d37e20c95d5c9.tar.bz2
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 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@75347 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'views')
-rw-r--r--views/window/window_win.cc23
1 files changed, 12 insertions, 11 deletions
diff --git a/views/window/window_win.cc b/views/window/window_win.cc
index be578834..83ad009 100644
--- a/views/window/window_win.cc
+++ b/views/window/window_win.cc
@@ -854,17 +854,18 @@ void WindowWin::OnMouseLeave() {
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