summaryrefslogtreecommitdiffstats
path: root/ash/wm/ash_focus_rules.cc
diff options
context:
space:
mode:
Diffstat (limited to 'ash/wm/ash_focus_rules.cc')
-rw-r--r--ash/wm/ash_focus_rules.cc12
1 files changed, 12 insertions, 0 deletions
diff --git a/ash/wm/ash_focus_rules.cc b/ash/wm/ash_focus_rules.cc
index c38c7d3..6bcae35 100644
--- a/ash/wm/ash_focus_rules.cc
+++ b/ash/wm/ash_focus_rules.cc
@@ -53,6 +53,18 @@ AshFocusRules::AshFocusRules() {
AshFocusRules::~AshFocusRules() {
}
+bool AshFocusRules::IsWindowConsideredActivatable(aura::Window* window) const {
+ // Only toplevel windows can be activated.
+ if (!IsToplevelWindow(window))
+ return false;
+
+ // The window must be visible.
+ if (!IsWindowConsideredVisibleForActivation(window))
+ return false;
+
+ return true;
+}
+
////////////////////////////////////////////////////////////////////////////////
// AshFocusRules, ::wm::FocusRules: