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

Unified Diff: ui/aura/desktop.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
Index: ui/aura/desktop.cc
diff --git a/ui/aura/desktop.cc b/ui/aura/desktop.cc
index 2c747d28beb72b28eb1182e205bcfd9f37ff51e2..a6c909a87aa6994a7f3b7d31b088fbc7fcc6def8 100644
--- a/ui/aura/desktop.cc
+++ b/ui/aura/desktop.cc
@@ -362,9 +362,13 @@ void Desktop::SetActiveWindow(Window* window, Window* to_focus) {
if (active_window_ == window)
return;
- if (active_window_ && active_window_->delegate())
- active_window_->delegate()->OnLostActive();
+ Window* old_active = active_window_;
active_window_ = window;
+ // Invoke OnLostActive after we've changed the active window. That way if the
+ // delegate queries for active state it doesn't think the window is still
+ // active.
+ if (old_active && old_active->delegate())
+ old_active->delegate()->OnLostActive();
if (active_window_) {
active_window_->parent()->MoveChildToFront(active_window_);
if (active_window_->delegate())

Powered by Google App Engine
This is Rietveld 408576698