summaryrefslogtreecommitdiffstats
path: root/chrome/views/custom_frame_window.cc
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/views/custom_frame_window.cc')
-rw-r--r--chrome/views/custom_frame_window.cc13
1 files changed, 11 insertions, 2 deletions
diff --git a/chrome/views/custom_frame_window.cc b/chrome/views/custom_frame_window.cc
index 711ccc8..5dc425a 100644
--- a/chrome/views/custom_frame_window.cc
+++ b/chrome/views/custom_frame_window.cc
@@ -274,7 +274,8 @@ class DefaultNonClientView : public NonClientView,
// Returns the resource collection to be used when rendering the window.
WindowResources* resources() const {
- return container_->is_active() ? active_resources_ : inactive_resources_;
+ return container_->is_active() || paint_as_active() ? active_resources_
+ : inactive_resources_;
}
// The View that provides the background for the window, and optionally
@@ -332,7 +333,8 @@ static const int kWindowVerticalBorderSize = 4;
DefaultNonClientView::DefaultNonClientView(
CustomFrameWindow* container)
- : client_view_(NULL),
+ : NonClientView(),
+ client_view_(NULL),
close_button_(new Button),
restore_button_(new Button),
maximize_button_(new Button),
@@ -902,6 +904,13 @@ void CustomFrameWindow::EnableClose(bool enable) {
Window::EnableClose(enable);
}
+void CustomFrameWindow::DisableInactiveRendering(bool disable) {
+ Window::DisableInactiveRendering(disable);
+ non_client_view_->set_paint_as_active(disable);
+ if (!disable)
+ non_client_view_->SchedulePaint();
+}
+
void CustomFrameWindow::SizeWindowToDefault() {
CSize pref(0, 0);
client_view()->GetPreferredSize(&pref);