Index: views/window/non_client_view.cc |
diff --git a/views/window/non_client_view.cc b/views/window/non_client_view.cc |
index 1f7effa7a5dc13fa240e671f4a3a69a9015be6d2..b6fc9233d25dbb11e71feeb6033ebbb87f769b5c 100644 |
--- a/views/window/non_client_view.cc |
+++ b/views/window/non_client_view.cc |
@@ -71,8 +71,8 @@ void NonClientView::UpdateFrame() { |
widget->UpdateFrameAfterFrameChange(); |
} |
-void NonClientView::DisableInactiveRendering(bool disable) { |
- frame_view_->DisableInactiveRendering(disable); |
+void NonClientView::SetInactiveRenderingDisabled(bool disable) { |
+ frame_view_->SetInactiveRenderingDisabled(disable); |
} |
gfx::Rect NonClientView::GetWindowBoundsForClientBounds( |
@@ -184,6 +184,17 @@ views::View* NonClientView::GetEventHandlerForPoint(const gfx::Point& point) { |
} |
//////////////////////////////////////////////////////////////////////////////// |
+// NonClientFrameView, public: |
+ |
+void NonClientFrameView::SetInactiveRenderingDisabled(bool disable) { |
+ if (paint_as_active_ == disable) |
+ return; |
+ |
+ paint_as_active_ = disable; |
+ ShouldPaintAsActiveChanged(); |
+} |
+ |
+//////////////////////////////////////////////////////////////////////////////// |
// NonClientFrameView, View overrides: |
bool NonClientFrameView::HitTest(const gfx::Point& l) const { |
@@ -248,6 +259,11 @@ bool NonClientFrameView::ShouldPaintAsActive() const { |
return GetWidget()->IsActive() || paint_as_active_; |
} |
+void NonClientFrameView::ShouldPaintAsActiveChanged() { |
+ if (!paint_as_active_) |
+ SchedulePaint(); |
+} |
+ |
void NonClientFrameView::GetAccessibleState(ui::AccessibleViewState* state) { |
state->role = ui::AccessibilityTypes::ROLE_WINDOW; |
} |