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

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: 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 d86edb2b44efee5357231e8ecd2d0cb327ef8143..d584fca994227a7ab66dead8f35e89c3da1121c1 100644
--- a/services/ui/ws/event_dispatcher.cc
+++ b/services/ui/ws/event_dispatcher.cc
@@ -320,7 +320,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());
}
@@ -437,7 +437,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);
@@ -538,7 +538,7 @@ Accelerator* EventDispatcher::FindAccelerator(
ServerWindow* EventDispatcher::FindDeepestVisibleWindowForEvents(
gfx::Point* location) {
- ServerWindow* root = delegate_->GetRootWindowContaining(*location);
+ ServerWindow* root = delegate_->GetRootWindowContaining(location);
if (!root)
return nullptr;
« no previous file with comments | « no previous file | services/ui/ws/event_dispatcher_delegate.h » ('j') | services/ui/ws/event_dispatcher_delegate.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698