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

Unified Diff: ui/views/view.cc

Issue 2604793002: Allow Widget to pass accelerator handling to its parent.
Patch Set: Created 4 years 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/view.cc
diff --git a/ui/views/view.cc b/ui/views/view.cc
index 79ba97a758d61e31b833edc0a0bb558eead74de7..47aa2acc249ab551dba1a12bfb036606b2934003 100644
--- a/ui/views/view.cc
+++ b/ui/views/view.cc
@@ -1215,7 +1215,8 @@ bool View::CanHandleAccelerators() const {
bool focus_in_child =
widget &&
widget->GetRootView()->Contains(GetFocusManager()->GetFocusedView());
- if ((child && !focus_in_child) || (!child && !widget->IsActive()))
+ if ((child && !focus_in_child) ||
+ (!child && !widget->CanHandleAccelerators()))
return false;
#endif
return true;

Powered by Google App Engine
This is Rietveld 408576698