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

Unified Diff: ui/aura/mus/window_tree_host_mus.cc

Issue 2918553003: Implement a MoveCursorToScreenLocation for just the window manager. (Closed)
Patch Set: Thread to the PlatformWindow. Created 3 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
Index: ui/aura/mus/window_tree_host_mus.cc
diff --git a/ui/aura/mus/window_tree_host_mus.cc b/ui/aura/mus/window_tree_host_mus.cc
index 85cdf6a4dbffecb270771c8ea66f2d378295362c..5e60905d5d1ed4472219b716b4076597c99e40cd 100644
--- a/ui/aura/mus/window_tree_host_mus.cc
+++ b/ui/aura/mus/window_tree_host_mus.cc
@@ -200,10 +200,12 @@ gfx::ICCProfile WindowTreeHostMus::GetICCProfileForCurrentDisplay() {
void WindowTreeHostMus::MoveCursorToScreenLocationInPixels(
const gfx::Point& location_in_pixels) {
- // TODO: this needs to message the server http://crbug.com/693340. Setting
- // the location is really only appropriate in tests, outside of tests this
- // value is ignored.
- NOTIMPLEMENTED();
+ gfx::Point screen_location_in_pixels = location_in_pixels;
+ gfx::Point location = GetLocationOnScreenInPixels();
+ screen_location_in_pixels.Offset(-location.x(), -location.y());
+ delegate_->OnWindowTreeHostMoveCursorToDisplayLocation(
+ screen_location_in_pixels, display_id_);
+
Env::GetInstance()->set_last_mouse_location(location_in_pixels);
}

Powered by Google App Engine
This is Rietveld 408576698