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

Unified Diff: ui/aura/root_window.cc

Issue 10543174: Aura: Add Window::MoveCursorTo() taking relative location to the window. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: review fix Created 8 years, 6 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: ui/aura/root_window.cc
diff --git a/ui/aura/root_window.cc b/ui/aura/root_window.cc
index 6c6d6bbde2f806dbba328489cb7595712220fa55..d84bc12855b0e0e42458d10846bed6c7c33acda3 100644
--- a/ui/aura/root_window.cc
+++ b/ui/aura/root_window.cc
@@ -217,7 +217,10 @@ void RootWindow::ShowCursor(bool show) {
}
void RootWindow::MoveCursorTo(const gfx::Point& location_in_dip) {
- host_->MoveCursorTo(ui::ConvertPointToPixel(layer(), location_in_dip));
+ gfx::Point location = location_in_dip;
+ layer()->transform().TransformPoint(location);
+ host_->MoveCursorTo(ui::ConvertPointToPixel(layer(), location));
+ last_mouse_location_ = location_in_dip;
}
bool RootWindow::ConfineCursorToWindow() {
@@ -652,6 +655,13 @@ void RootWindow::ReleaseNativeCapture() {
}
////////////////////////////////////////////////////////////////////////////////
Ben Goodger (Google) 2012/06/18 20:30:52 delete these two lines
+// RootWindow, for test purpose:
+
+gfx::Point RootWindow::QueryMouseLocationForTest() const {
+ return host_->QueryMouseLocation();
+}
+
+////////////////////////////////////////////////////////////////////////////////
// RootWindow, private:
void RootWindow::HandleMouseMoved(const MouseEvent& event, Window* target) {
« ui/aura/root_window.h ('K') | « ui/aura/root_window.h ('k') | ui/aura/window.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698