OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "views/widget/widget.h" | 5 #include "views/widget/widget.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "base/message_loop.h" | 8 #include "base/message_loop.h" |
9 #include "base/utf_string_conversions.h" | 9 #include "base/utf_string_conversions.h" |
10 #include "ui/base/l10n/l10n_font_util.h" | 10 #include "ui/base/l10n/l10n_font_util.h" |
(...skipping 1092 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1103 } | 1103 } |
1104 | 1104 |
1105 //////////////////////////////////////////////////////////////////////////////// | 1105 //////////////////////////////////////////////////////////////////////////////// |
1106 // Widget, private: | 1106 // Widget, private: |
1107 | 1107 |
1108 bool Widget::ShouldReleaseCaptureOnMouseReleased() const { | 1108 bool Widget::ShouldReleaseCaptureOnMouseReleased() const { |
1109 return true; | 1109 return true; |
1110 } | 1110 } |
1111 | 1111 |
1112 void Widget::SetInactiveRenderingDisabled(bool value) { | 1112 void Widget::SetInactiveRenderingDisabled(bool value) { |
1113 if (value == disable_inactive_rendering_) | |
1114 return; | |
1115 | |
1116 disable_inactive_rendering_ = value; | 1113 disable_inactive_rendering_ = value; |
| 1114 // We need to always notify the NonClientView so that it can trigger a paint. |
| 1115 // TODO: what's really needed is a way to know when either the active state |
| 1116 // changes or |disable_inactive_rendering_| changes. |
1117 if (non_client_view_) | 1117 if (non_client_view_) |
1118 non_client_view_->SetInactiveRenderingDisabled(value); | 1118 non_client_view_->SetInactiveRenderingDisabled(value); |
1119 native_widget_->SetInactiveRenderingDisabled(value); | 1119 native_widget_->SetInactiveRenderingDisabled(value); |
1120 } | 1120 } |
1121 | 1121 |
1122 void Widget::SaveWindowPlacement() { | 1122 void Widget::SaveWindowPlacement() { |
1123 // The window delegate does the actual saving for us. It seems like (judging | 1123 // The window delegate does the actual saving for us. It seems like (judging |
1124 // by go/crash) that in some circumstances we can end up here after | 1124 // by go/crash) that in some circumstances we can end up here after |
1125 // WM_DESTROY, at which point the window delegate is likely gone. So just | 1125 // WM_DESTROY, at which point the window delegate is likely gone. So just |
1126 // bail. | 1126 // bail. |
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1199 | 1199 |
1200 //////////////////////////////////////////////////////////////////////////////// | 1200 //////////////////////////////////////////////////////////////////////////////// |
1201 // internal::NativeWidgetPrivate, NativeWidget implementation: | 1201 // internal::NativeWidgetPrivate, NativeWidget implementation: |
1202 | 1202 |
1203 internal::NativeWidgetPrivate* NativeWidgetPrivate::AsNativeWidgetPrivate() { | 1203 internal::NativeWidgetPrivate* NativeWidgetPrivate::AsNativeWidgetPrivate() { |
1204 return this; | 1204 return this; |
1205 } | 1205 } |
1206 | 1206 |
1207 } // namespace internal | 1207 } // namespace internal |
1208 } // namespace views | 1208 } // namespace views |
OLD | NEW |