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

Unified Diff: views/focus/focus_manager.cc

Issue 3046041: [Linux Views] Refactor accelerator handler related code. (Closed) Base URL: http://src.chromium.org/git/chromium.git
Patch Set: Prevent ctrl+alt. Created 10 years, 5 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: views/focus/focus_manager.cc
diff --git a/views/focus/focus_manager.cc b/views/focus/focus_manager.cc
index 5a94c95f176016b6bdea22106fd3157c13a42cf0..f0f5f9901e211ef5ef7d16af55b2838b79b1bae4 100644
--- a/views/focus/focus_manager.cc
+++ b/views/focus/focus_manager.cc
@@ -81,9 +81,13 @@ FocusManager::~FocusManager() {
}
bool FocusManager::OnKeyEvent(const KeyEvent& event) {
+#if defined(OS_WIN)
// If the focused view wants to process the key event as is, let it be.
+ // On Linux we always dispatch key events to the focused view first, so
+ // we should not do this check here. See also WidgetGtk::OnKeyEvent().
if (focused_view_ && focused_view_->SkipDefaultKeyEventProcessing(event))
return true;
+#endif
// Intercept Tab related messages for focus traversal.
// Note that we don't do focus traversal if the root window is not part of the

Powered by Google App Engine
This is Rietveld 408576698