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

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

Issue 838033006: Fix the issue that When hiding a window will change its transient child windows' property. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add unit tests. Created 5 years, 11 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/wm/core/focus_controller.cc
diff --git a/ui/wm/core/focus_controller.cc b/ui/wm/core/focus_controller.cc
index 722f6c893f9d1e811af21783fcd70a187e96e231..446e82c269fc4e852491886d1207ecfeaddc93cf 100644
--- a/ui/wm/core/focus_controller.cc
+++ b/ui/wm/core/focus_controller.cc
@@ -184,6 +184,9 @@ void FocusController::OnWindowVisibilityChanged(aura::Window* window,
}
void FocusController::OnWindowDestroying(aura::Window* window) {
+ // A window's modality state will interfere with focus restoration during its
+ // destruction.
+ window->ClearProperty(aura::client::kModalKey);
WindowLostFocusFromDispositionChange(window, window->parent());
}
@@ -325,9 +328,6 @@ void FocusController::SetActiveWindow(aura::Window* requested_window,
void FocusController::WindowLostFocusFromDispositionChange(
aura::Window* window,
aura::Window* next) {
- // A window's modality state will interfere with focus restoration during its
- // destruction.
- window->ClearProperty(aura::client::kModalKey);
// TODO(beng): See if this function can be replaced by a call to
// FocusWindow().
// Activation adjustments are handled first in the event of a disposition

Powered by Google App Engine
This is Rietveld 408576698