Chromium Code Reviews| Index: ui/views/window/non_client_view.cc |
| diff --git a/ui/views/window/non_client_view.cc b/ui/views/window/non_client_view.cc |
| index fbdbce21ba7f7efa343857a7be3f3846fe1c71eb..ba124984741b3eef41352061e6b895a0789e091e 100644 |
| --- a/ui/views/window/non_client_view.cc |
| +++ b/ui/views/window/non_client_view.cc |
| @@ -232,12 +232,19 @@ views::View* NonClientView::GetTooltipHandlerForPoint(const gfx::Point& point) { |
| //////////////////////////////////////////////////////////////////////////////// |
| // NonClientFrameView, public: |
| +NonClientFrameView::~NonClientFrameView() { |
| +} |
| + |
| void NonClientFrameView::SetInactiveRenderingDisabled(bool disable) { |
| - if (paint_as_active_ == disable) |
| + if (inactive_rendering_disabled_ == disable) |
| return; |
| - paint_as_active_ = disable; |
| - ShouldPaintAsActiveChanged(); |
| + inactive_rendering_disabled_ = disable; |
| + SchedulePaint(); |
|
sky
2014/01/06 19:13:49
Is this only necessary if !active?
|
| +} |
| + |
| +bool NonClientFrameView::ShouldPaintAsActive() const { |
| + return GetWidget()->IsActive() || inactive_rendering_disabled_; |
|
sadrul
2014/01/03 17:59:51
We trigger SchedulePaint() when |inactive_renderin
pkotwicz
2014/01/03 20:57:16
Yes, NativeWidgetAura::OnWindowActivated() does th
sky
2014/01/06 19:13:49
nit: check inactive_rendering_disabled_ first (it'
|
| } |
| int NonClientFrameView::GetHTComponentForFrame(const gfx::Point& point, |
| @@ -301,14 +308,6 @@ bool NonClientFrameView::HitTestRect(const gfx::Rect& rect) const { |
| //////////////////////////////////////////////////////////////////////////////// |
| // NonClientFrameView, protected: |
| -bool NonClientFrameView::ShouldPaintAsActive() const { |
| - return GetWidget()->IsActive() || paint_as_active_; |
| -} |
| - |
| -void NonClientFrameView::ShouldPaintAsActiveChanged() { |
| - SchedulePaint(); |
| -} |
| - |
| void NonClientFrameView::GetAccessibleState(ui::AccessibleViewState* state) { |
| state->role = ui::AccessibilityTypes::ROLE_CLIENT; |
| } |
| @@ -322,4 +321,7 @@ void NonClientFrameView::OnBoundsChanged(const gfx::Rect& previous_bounds) { |
| // FrameView when it is itself laid out, see comment in NonClientView::Layout. |
| } |
| +NonClientFrameView::NonClientFrameView() : inactive_rendering_disabled_(false) { |
| +} |
| + |
| } // namespace views |