Chromium Code Reviews| 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 b71391bc5bab8f5977235c55f7e570fe3f791b1c..71932238bd08517bdb16a95e2deaac41fc07ab3c 100644 |
| --- a/ui/aura/mus/window_tree_client.cc |
| +++ b/ui/aura/mus/window_tree_client.cc |
| @@ -47,6 +47,7 @@ |
| #include "ui/display/display.h" |
| #include "ui/display/screen.h" |
| #include "ui/events/event.h" |
| +#include "ui/events/event_processor.h" |
| #include "ui/gfx/geometry/dip_util.h" |
| #include "ui/gfx/geometry/insets.h" |
| #include "ui/gfx/geometry/size.h" |
| @@ -1149,14 +1150,10 @@ void WindowTreeClient::OnWindowInputEvent(uint32_t event_id, |
| WindowTreeHostMus* host = GetWindowTreeHostMus(window); |
| DCHECK(host); |
| - // The location of the event is relative to |window|. As the event is handed |
| - // to WindowTreeHost we need it to be relative to WindowTreeHost. |
| - if (event->IsLocatedEvent()) { |
| - gfx::Point host_location = event->AsLocatedEvent()->location(); |
| - aura::Window::ConvertPointToTarget(window->GetWindow(), host->window(), |
| - &host_location); |
| - event->AsLocatedEvent()->set_location(host_location); |
| - } |
| + // Send the target window that this event should be dispatched to to the event |
| + // processor. |
| + window->GetWindow()->GetHost()->event_processor()->set_event_target( |
| + window->GetWindow()); |
|
sadrul
2017/02/07 04:04:54
This is somewhat awkward.
Can we set ui::Event::t
sky
2017/02/07 04:19:48
Extremely!
What's wrong with trying to find the lo
riajiang
2017/02/07 17:42:40
Done! I didn't know we can set the target for an e
|
| EventAckHandler ack_handler(CreateEventResultCallback(event_id)); |
| // TODO(moshayedi): crbug.com/617222. No need to convert to ui::MouseEvent or |