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

Unified Diff: ui/aura/mus/window_tree_client.cc

Issue 2831583005: Enable Config::MUS to use classic IME instead of servicified IME. (Closed)
Patch Set: Addressed feedback. Created 3 years, 7 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
« no previous file with comments | « ash/shell.cc ('k') | ui/aura/mus/window_tree_host_mus.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/aura/mus/window_tree_client.cc
diff --git a/ui/aura/mus/window_tree_client.cc b/ui/aura/mus/window_tree_client.cc
index 7031002781fb81249231a9240e1a7cb98f196612..f264e4d4805a9a7cad33ca76b042834253dad7c3 100644
--- a/ui/aura/mus/window_tree_client.cc
+++ b/ui/aura/mus/window_tree_client.cc
@@ -1283,18 +1283,6 @@ void WindowTreeClient::OnWindowInputEvent(uint32_t event_id,
WindowMus* window = GetWindowByServerId(window_id); // May be null.
- if (event->IsKeyEvent()) {
- DCHECK(!matches_pointer_watcher); // PointerWatcher isn't for key events.
- if (!window || !window->GetWindow()->GetHost()) {
- tree_->OnWindowInputEventAck(event_id, ui::mojom::EventResult::UNHANDLED);
- return;
- }
- InputMethodMus* input_method = GetWindowTreeHostMus(window)->input_method();
- input_method->DispatchKeyEvent(event->AsKeyEvent(),
- CreateEventResultCallback(event_id));
- return;
- }
-
if (matches_pointer_watcher && has_pointer_watcher_) {
DCHECK(event->IsPointerEvent());
std::unique_ptr<ui::Event> event_in_dip(ui::Event::Clone(*event));
@@ -1319,6 +1307,15 @@ void WindowTreeClient::OnWindowInputEvent(uint32_t event_id,
return;
}
+ if (event->IsKeyEvent()) {
+ InputMethodMus* input_method = GetWindowTreeHostMus(window)->input_method();
+ if (input_method) {
+ input_method->DispatchKeyEvent(event->AsKeyEvent(),
+ CreateEventResultCallback(event_id));
+ return;
+ }
+ }
+
EventAckHandler ack_handler(CreateEventResultCallback(event_id));
// TODO(moshayedi): crbug.com/617222. No need to convert to ui::MouseEvent or
// ui::TouchEvent once we have proper support for pointer events.
« no previous file with comments | « ash/shell.cc ('k') | ui/aura/mus/window_tree_host_mus.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698