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

Unified Diff: ui/views/widget/desktop_aura/desktop_focus_rules.cc

Issue 186733011: Fixes bug that resulted in status bubble getting hidden (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: comment 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
Index: ui/views/widget/desktop_aura/desktop_focus_rules.cc
diff --git a/ui/views/widget/desktop_aura/desktop_focus_rules.cc b/ui/views/widget/desktop_aura/desktop_focus_rules.cc
index c63250c42468a811e165890b96bf998886a47e51..16f71c586a50230e00c65a4b12edffac7813adcc 100644
--- a/ui/views/widget/desktop_aura/desktop_focus_rules.cc
+++ b/ui/views/widget/desktop_aura/desktop_focus_rules.cc
@@ -14,6 +14,14 @@ DesktopFocusRules::DesktopFocusRules(aura::Window* content_window)
DesktopFocusRules::~DesktopFocusRules() {}
+bool DesktopFocusRules::CanActivateWindow(aura::Window* window) const {
+ if (!BaseFocusRules::CanActivateWindow(window))
+ return false;
+ // Never activate a window that is not a child of the root window. Transients
+ // spanning different DesktopNativeWidgetAuras may trigger this.
+ return !window || content_window_->GetRootWindow()->Contains(window);
+}
+
bool DesktopFocusRules::SupportsChildActivation(aura::Window* window) const {
// In Desktop-Aura, only the content_window or children of the RootWindow are
// activatable.
« no previous file with comments | « ui/views/widget/desktop_aura/desktop_focus_rules.h ('k') | ui/views/widget/desktop_aura/desktop_focus_rules_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698