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

Unified Diff: content/browser/renderer_host/input/web_input_event_builders_mac.mm

Issue 2349143004: Plumbing stylus tilt for Mac (Closed)
Patch Set: Created 4 years, 3 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/renderer_host/input/web_input_event_builders_mac.mm
diff --git a/content/browser/renderer_host/input/web_input_event_builders_mac.mm b/content/browser/renderer_host/input/web_input_event_builders_mac.mm
index 8ca506cfa82525c45975cdfb1eacff623b6da87e..93b89a16ce1e8037f0491b98c06934e478c39345 100644
--- a/content/browser/renderer_host/input/web_input_event_builders_mac.mm
+++ b/content/browser/renderer_host/input/web_input_event_builders_mac.mm
@@ -413,6 +413,9 @@ blink::WebMouseEvent WebMouseEventBuilder::Build(NSEvent* event, NSView* view) {
}
result.id = [event deviceID];
result.force = [event pressure];
+ NSPoint tilt = [event tilt];
+ result.tiltX = (int) (tilt.x * 90);
dtapuska 2016/09/20 15:50:50 Can we round instead of truncate? That is what we
lanwei 2016/09/20 16:12:45 Acknowledged.
+ result.tiltY = (int) (tilt.y * 90);
return result;
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698