| Index: ash/wm/focus_rules.cc
|
| diff --git a/ash/wm/focus_rules.cc b/ash/wm/focus_rules.cc
|
| index b1ca005377ded3d6b17c0961ef0e83dc45599118..0decb790f81ac1d6a3813ef8e81106e87441b7f6 100644
|
| --- a/ash/wm/focus_rules.cc
|
| +++ b/ash/wm/focus_rules.cc
|
| @@ -9,6 +9,7 @@
|
| #include "ash/shell_delegate.h"
|
| #include "ash/wm/window_state.h"
|
| #include "ui/aura/window.h"
|
| +#include "ui/wm/public/activation_delegate.h"
|
|
|
| namespace ash {
|
|
|
| @@ -29,8 +30,15 @@ bool IsWindowConsideredActivatable(aura::Window* window) {
|
| if (!IsToplevelWindow(window))
|
| return false;
|
|
|
| - // The window must be visible.
|
| - return IsWindowConsideredVisibleForActivation(window);
|
| + if (!IsWindowConsideredVisibleForActivation(window))
|
| + return false;
|
| +
|
| + if (::wm::GetActivationDelegate(window) &&
|
| + !::wm::GetActivationDelegate(window)->ShouldActivate()) {
|
| + return false;
|
| + }
|
| +
|
| + return window->CanFocus();
|
| }
|
|
|
| bool IsWindowConsideredVisibleForActivation(aura::Window* window) {
|
|
|