diff options
author | sky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-11-03 15:01:06 +0000 |
---|---|---|
committer | sky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-11-03 15:01:06 +0000 |
commit | d0084c88b8deb992bbf781b23fb783252ae7d9ab (patch) | |
tree | 74815a2710004628cc7b95cf1e495749b3ba0334 /views | |
parent | 1e8e59043dd37925182904000a323e2b7290c862 (diff) | |
download | chromium_src-d0084c88b8deb992bbf781b23fb783252ae7d9ab.zip chromium_src-d0084c88b8deb992bbf781b23fb783252ae7d9ab.tar.gz chromium_src-d0084c88b8deb992bbf781b23fb783252ae7d9ab.tar.bz2 |
Fixes painting regression. The problem was I optimized to only send to
NonClientView when inactive rendering disabled changes, but
implementations are relying on this to be sent when active state may
have changed too. This isn't the right fix, but gives us the old
behavior. We really need to persist active state in widget, then
notify the NonClientView when it changes, or the inactive rendering
disabled state changes.
BUG=102695
TEST=easiest to verify on windows in classic mode (non-aero). Create
two chrome windows, click between them and make sure the window losing
activation state looks inactive.
R=ben@chromium.org
Review URL: http://codereview.chromium.org/8386064
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@108465 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'views')
-rw-r--r-- | views/widget/widget.cc | 6 | ||||
-rw-r--r-- | views/window/non_client_view.cc | 5 |
2 files changed, 5 insertions, 6 deletions
diff --git a/views/widget/widget.cc b/views/widget/widget.cc index 5b305c4..029b920 100644 --- a/views/widget/widget.cc +++ b/views/widget/widget.cc @@ -1110,10 +1110,10 @@ bool Widget::ShouldReleaseCaptureOnMouseReleased() const { } void Widget::SetInactiveRenderingDisabled(bool value) { - if (value == disable_inactive_rendering_) - return; - disable_inactive_rendering_ = value; + // We need to always notify the NonClientView so that it can trigger a paint. + // TODO: what's really needed is a way to know when either the active state + // changes or |disable_inactive_rendering_| changes. if (non_client_view_) non_client_view_->SetInactiveRenderingDisabled(value); native_widget_->SetInactiveRenderingDisabled(value); diff --git a/views/window/non_client_view.cc b/views/window/non_client_view.cc index b6fc923..92c7bc7 100644 --- a/views/window/non_client_view.cc +++ b/views/window/non_client_view.cc @@ -187,9 +187,8 @@ views::View* NonClientView::GetEventHandlerForPoint(const gfx::Point& point) { // NonClientFrameView, public: void NonClientFrameView::SetInactiveRenderingDisabled(bool disable) { - if (paint_as_active_ == disable) - return; - + // See comment in Widget::SetInactiveRenderingDisabled as to why we don't + // conditionally invoke ShouldPaintAsActiveChanged. paint_as_active_ = disable; ShouldPaintAsActiveChanged(); } |