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

Unified Diff: ash/host/ash_window_tree_host_x11.cc

Issue 139983009: ui::LocatedEvent location() returns gfx::PointF (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Undo accidental change. Created 6 years, 8 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: ash/host/ash_window_tree_host_x11.cc
diff --git a/ash/host/ash_window_tree_host_x11.cc b/ash/host/ash_window_tree_host_x11.cc
index e49e9617727490faa3b400f4998022d46c448f86..e3bc003f60edb1b0a79168b6fdf98d8e12b00a87 100644
--- a/ash/host/ash_window_tree_host_x11.cc
+++ b/ash/host/ash_window_tree_host_x11.cc
@@ -124,7 +124,7 @@ class AshWindowTreeHostX11::TouchEventCalibrate
}
// Set the modified coordinate back to the event.
- if (event->root_location() == event->location()) {
+ if (event->root_location() == gfx::ToFlooredPoint(event->location())) {
// Usually those will be equal,
// if not, I am not sure what the correct value should be.
event->set_root_location(gfx::Point(x, y));
@@ -341,8 +341,9 @@ void AshWindowTreeHostX11::TranslateAndDispatchLocatedEvent(
aura::client::GetScreenPositionClient(root_window);
gfx::Rect local(bounds().size());
- if (screen_position_client && !local.Contains(event->location())) {
- gfx::Point location(event->location());
+ if (screen_position_client &&
+ !local.Contains(gfx::ToFlooredPoint(event->location()))) {
+ gfx::Point location(gfx::ToFlooredPoint(event->location()));
// In order to get the correct point in screen coordinates
// during passive grab, we first need to find on which host window
// the mouse is on, and find out the screen coordinates on that

Powered by Google App Engine
This is Rietveld 408576698