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

Unified Diff: services/ui/ws/event_dispatcher.cc

Issue 2237003002: Find display root ServerWindow for located events in mus. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@add_display
Patch Set: Fixes. Created 4 years, 4 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
Index: services/ui/ws/event_dispatcher.cc
diff --git a/services/ui/ws/event_dispatcher.cc b/services/ui/ws/event_dispatcher.cc
index 1d22a46f3f09e5035535d8d1f2d22e6c0128c52c..06c632338126f2ff3003a0152083913836d6ee5e 100644
--- a/services/ui/ws/event_dispatcher.cc
+++ b/services/ui/ws/event_dispatcher.cc
@@ -322,7 +322,7 @@ void EventDispatcher::ProcessLocatedEvent(const ui::LocatedEvent& event) {
event.IsMousePointerEvent() || event.IsMouseWheelEvent();
if (is_mouse_event) {
- mouse_pointer_last_location_ = event.location();
+ mouse_pointer_last_location_ = event.root_location();
delegate_->OnMouseCursorLocationChanged(event.root_location());
}
@@ -439,7 +439,7 @@ void EventDispatcher::UpdateTargetForPointer(int32_t pointer_id,
EventDispatcher::PointerTarget EventDispatcher::PointerTargetForEvent(
const ui::LocatedEvent& event) {
PointerTarget pointer_target;
- gfx::Point location(event.location());
+ gfx::Point location(event.root_location());
ServerWindow* target_window = FindDeepestVisibleWindowForEvents(&location);
pointer_target.window =
modal_window_controller_.GetTargetForWindow(target_window);
@@ -540,7 +540,7 @@ Accelerator* EventDispatcher::FindAccelerator(
ServerWindow* EventDispatcher::FindDeepestVisibleWindowForEvents(
gfx::Point* location) {
- ServerWindow* root = delegate_->GetRootWindowContaining(*location);
+ ServerWindow* root = delegate_->GetRootWindowContaining(location);
if (!root)
return nullptr;

Powered by Google App Engine
This is Rietveld 408576698