Index: ui/views/corewm/input_method_event_filter.cc |
diff --git a/ui/views/corewm/input_method_event_filter.cc b/ui/views/corewm/input_method_event_filter.cc |
index f80d3ca6cc2127c11369cc5353a9bfcc15fe1432..d7a1d383de18b1e890b76640ecef9e10ad111d6b 100644 |
--- a/ui/views/corewm/input_method_event_filter.cc |
+++ b/ui/views/corewm/input_method_event_filter.cc |
@@ -37,14 +37,13 @@ void InputMethodEventFilter::SetInputMethodPropertyInRootWindow( |
//////////////////////////////////////////////////////////////////////////////// |
// InputMethodEventFilter, EventFilter implementation: |
-ui::EventResult InputMethodEventFilter::OnKeyEvent(ui::KeyEvent* event) { |
+void InputMethodEventFilter::OnKeyEvent(ui::KeyEvent* event) { |
const ui::EventType type = event->type(); |
if (type == ui::ET_TRANSLATED_KEY_PRESS || |
type == ui::ET_TRANSLATED_KEY_RELEASE) { |
// The |event| is already handled by this object, change the type of the |
// event to ui::ET_KEY_* and pass it to the next filter. |
static_cast<ui::TranslatedKeyEvent*>(event)->ConvertToKeyEvent(); |
- return ui::ER_UNHANDLED; |
} else { |
// If the focused window is changed, all requests to IME will be |
// discarded so it's safe to update the target_root_window_ here. |
@@ -55,7 +54,7 @@ ui::EventResult InputMethodEventFilter::OnKeyEvent(ui::KeyEvent* event) { |
input_method_->DispatchKeyEvent(event->native_event()); |
else |
input_method_->DispatchFabricatedKeyEvent(*event); |
- return ui::ER_CONSUMED; |
+ event->StopPropagation(); |
} |
} |