diff options
Diffstat (limited to 'ui/views/corewm/focus_controller.cc')
-rw-r--r-- | ui/views/corewm/focus_controller.cc | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/ui/views/corewm/focus_controller.cc b/ui/views/corewm/focus_controller.cc index 1daba43..eaab151 100644 --- a/ui/views/corewm/focus_controller.cc +++ b/ui/views/corewm/focus_controller.cc @@ -336,7 +336,11 @@ void FocusController::WindowLostFocusFromDispositionChange( } void FocusController::WindowFocusedFromInputEvent(aura::Window* window) { - FocusWindow(window); + // Only focus |window| if it or any of its parents can be focused. Otherwise + // FocusWindow() will focus the topmost window, which may not be the + // currently focused one. + if (rules_->CanFocusWindow(GetToplevelWindow(window))) + FocusWindow(window); } } // namespace corewm |