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

Unified Diff: ui/events/win/events_win.cc

Issue 478523002: mojo events: Add |screen_location| to LocationData. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix crash observed locally because of synthesized aura events. Created 6 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
« no previous file with comments | « mojo/services/public/interfaces/input_events/input_events.mojom ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/events/win/events_win.cc
diff --git a/ui/events/win/events_win.cc b/ui/events/win/events_win.cc
index 5a2c7d7e38be1e2566dbf33efeafbc3f7ff7034b..4a619cc829bd4ce74c8dfc7a1989d570a0142d11 100644
--- a/ui/events/win/events_win.cc
+++ b/ui/events/win/events_win.cc
@@ -241,9 +241,10 @@ gfx::Point EventLocationFromNative(const base::NativeEvent& native_event) {
gfx::Point EventSystemLocationFromNative(
const base::NativeEvent& native_event) {
- // TODO(ben): Needs to always return screen position here. Returning normal
- // origin for now since that's obviously wrong.
- return gfx::Point(0, 0);
+ POINT global_point = { static_cast<short>(LOWORD(native_event.lParam)),
+ static_cast<short>(HIWORD(native_event.lParam)) };
+ ClientToScreen(native_event.hwnd, &global_point);
+ return gfx::Point(global_point);
}
KeyboardCode KeyboardCodeFromNative(const base::NativeEvent& native_event) {
« no previous file with comments | « mojo/services/public/interfaces/input_events/input_events.mojom ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698