Index: ui/aura/window_event_dispatcher.cc |
diff --git a/ui/aura/window_event_dispatcher.cc b/ui/aura/window_event_dispatcher.cc |
index 559c9524748a85e10b0cb0fc40780d28baeb5aef..6dca4671f0cb9701f2e0185cffb3501d06a9e476 100644 |
--- a/ui/aura/window_event_dispatcher.cc |
+++ b/ui/aura/window_event_dispatcher.cc |
@@ -309,11 +309,16 @@ ui::EventDispatchDetails WindowEventDispatcher::ProcessGestures( |
if (!target) |
return details; |
+ WindowEventDispatcher* dispatcher = this; |
for (const auto& event : gestures) { |
- event->ConvertLocationToTarget(window(), target); |
- details = DispatchEvent(target, event.get()); |
+ event->ConvertLocationToTarget(dispatcher->window(), target); |
+ details = dispatcher->DispatchEvent(target, event.get()); |
if (details.dispatcher_destroyed || details.target_destroyed) |
break; |
+ // If the target window has moved off to a different WindowTreeHost, then |
+ // reroute them to the right place. |
+ if (!dispatcher->window()->Contains(target)) |
+ dispatcher = target->GetHost()->dispatcher(); |
sadrul
2017/04/27 02:33:31
We should no longer need this change. If you want
weidongg
2017/04/27 03:07:32
Sure, I could leave this file untouched, as Window
|
} |
return details; |
} |