Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(35)

Unified Diff: views/window/non_client_view.cc

Issue 8351042: Gets disable inactive frame rendering to work correctly for aura. This (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Tweaks Created 9 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« views/widget/native_widget_aura.cc ('K') | « views/window/non_client_view.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
}
« views/widget/native_widget_aura.cc ('K') | « views/window/non_client_view.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698