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

Unified Diff: ui/events/ozone/events_ozone.cc

Issue 695153003: ozone: Use root location for EventSystemLocationFromNative Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 1 month 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
« no previous file with comments | « ash/display/mouse_cursor_event_filter.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/events/ozone/events_ozone.cc
diff --git a/ui/events/ozone/events_ozone.cc b/ui/events/ozone/events_ozone.cc
index d2e1e33b5775e8874ffb814599f6c01068a8f5f8..04691c38e2b403ad6186ba52f778d1c7f2afe598 100644
--- a/ui/events/ozone/events_ozone.cc
+++ b/ui/events/ozone/events_ozone.cc
@@ -31,13 +31,15 @@ gfx::Point EventSystemLocationFromNative(
const base::NativeEvent& native_event) {
const ui::LocatedEvent* e =
static_cast<const ui::LocatedEvent*>(native_event);
- DCHECK(e->IsMouseEvent() || e->IsTouchEvent() || e->IsGestureEvent() ||
- e->IsScrollEvent());
- return e->location();
+ DCHECK(e->IsLocatedEvent());
+ return e->root_location();
}
gfx::Point EventLocationFromNative(const base::NativeEvent& native_event) {
- return EventSystemLocationFromNative(native_event);
+ const ui::LocatedEvent* e =
+ static_cast<const ui::LocatedEvent*>(native_event);
+ DCHECK(e->IsLocatedEvent());
+ return e->location();
}
int GetChangedMouseButtonFlagsFromNative(
« no previous file with comments | « ash/display/mouse_cursor_event_filter.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698