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

Unified Diff: ui/wm/core/focus_controller.cc

Issue 180273025: Keep dedicated layers for hiding animation (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 9 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
« no previous file with comments | « ash/wm/workspace_controller_unittest.cc ('k') | ui/wm/core/focus_controller_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/wm/core/focus_controller.cc
diff --git a/ui/wm/core/focus_controller.cc b/ui/wm/core/focus_controller.cc
index c4e67cf6d072debd8da28adb34fb598b7de1ed4e..38e8920b47a33db849221747001e76099681cadf 100644
--- a/ui/wm/core/focus_controller.cc
+++ b/ui/wm/core/focus_controller.cc
@@ -32,24 +32,6 @@ void StackTransientParentsBelowModalWindow(aura::Window* window) {
}
}
-// Stack's |window|'s layer above |relative_to|'s layer.
-void StackWindowLayerAbove(aura::Window* window, aura::Window* relative_to) {
- // Stack |window| above the last transient child of |relative_to| that shares
- // the same parent.
- const aura::Window::Windows& window_transients(
- GetTransientChildren(relative_to));
- for (aura::Window::Windows::const_iterator i = window_transients.begin();
- i != window_transients.end(); ++i) {
- aura::Window* transient = *i;
- if (transient->parent() == relative_to->parent())
- relative_to = transient;
- }
- if (window != relative_to) {
- window->layer()->parent()->StackAbove(window->layer(),
- relative_to->layer());
- }
-}
-
} // namespace
////////////////////////////////////////////////////////////////////////////////
@@ -208,14 +190,8 @@ void FocusController::OnGestureEvent(ui::GestureEvent* event) {
void FocusController::OnWindowVisibilityChanged(aura::Window* window,
bool visible) {
- if (!visible) {
+ if (!visible)
WindowLostFocusFromDispositionChange(window, window->parent());
- // Despite the focus change, we need to keep the window being hidden
- // stacked above the new window so it stays open on top as it animates away.
- aura::Window* next_window = GetActiveWindow();
- if (next_window && next_window->parent() == window->parent())
- StackWindowLayerAbove(window, next_window);
- }
}
void FocusController::OnWindowDestroying(aura::Window* window) {
« no previous file with comments | « ash/wm/workspace_controller_unittest.cc ('k') | ui/wm/core/focus_controller_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698