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

Unified Diff: ui/aura/root_window.cc

Issue 10408037: aura: Fix the sythentic mouse-event location. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: alternate-fix Created 8 years, 7 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: ui/aura/root_window.cc
diff --git a/ui/aura/root_window.cc b/ui/aura/root_window.cc
index a78db6983ec2cbbed2f5f74cce4c1f4c988387bc..6d30a32b17334dbcdaa33ac7e6fcb655126c1c66 100644
--- a/ui/aura/root_window.cc
+++ b/ui/aura/root_window.cc
@@ -31,6 +31,7 @@
#include "ui/compositor/layer.h"
#include "ui/compositor/layer_animator.h"
#include "ui/gfx/monitor.h"
+#include "ui/gfx/point3.h"
#include "ui/gfx/screen.h"
using std::vector;
@@ -1003,8 +1004,12 @@ void RootWindow::SynthesizeMouseMoveEvent() {
synthesize_mouse_move_ = false;
#if !defined(OS_WIN)
// Temporarily disabled for windows. See crbug.com/112222.
- gfx::Point orig_mouse_location = last_mouse_location_;
- layer()->transform().TransformPoint(orig_mouse_location);
+ gfx::Point3f point(last_mouse_location_);
+ ui::Transform transform = layer()->transform();
+ float scale = ui::GetDeviceScaleFactor(layer());
+ transform.ConcatScale(scale, scale);
+ transform.TransformPoint(point);
+ gfx::Point orig_mouse_location = point.AsPoint();
// TODO(derat|oshima): Don't use mouse_button_flags_ as it's
// currently broken. See/ crbug.com/107931.
« 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