| 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 b69109eb2360aab9f44f2615a3cf70c5837c85c5..128a591547fc3555731dfc7e9b3c030ad9ba63db 100644
|
| --- a/ui/aura/mus/window_tree_client.cc
|
| +++ b/ui/aura/mus/window_tree_client.cc
|
| @@ -52,6 +52,7 @@
|
| #include "ui/base/ui_base_types.h"
|
| #include "ui/display/screen.h"
|
| #include "ui/events/event.h"
|
| +#include "ui/events/event_sink.h"
|
| #include "ui/gfx/geometry/dip_util.h"
|
| #include "ui/gfx/geometry/insets.h"
|
| #include "ui/gfx/geometry/size.h"
|
| @@ -1282,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));
|
| @@ -1308,6 +1297,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.
|
|
|