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

Unified Diff: ui/ozone/platform/dri/dri_cursor.cc

Issue 766583002: ozone: dri: Support moving between displays in MoveCursorTo(location) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 1 month 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 | « ui/ozone/platform/caca/ozone_platform_caca.cc ('k') | ui/ozone/platform/dri/dri_window.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/ozone/platform/dri/dri_cursor.cc
diff --git a/ui/ozone/platform/dri/dri_cursor.cc b/ui/ozone/platform/dri/dri_cursor.cc
index 5a59251454612cbc3d8fbff16d731255be335502..d500bbbc38fd2bfaa04df1cedcfc1fe2afa1fa7b 100644
--- a/ui/ozone/platform/dri/dri_cursor.cc
+++ b/ui/ozone/platform/dri/dri_cursor.cc
@@ -78,7 +78,13 @@ void DriCursor::MoveCursorTo(gfx::AcceleratedWidget widget,
}
void DriCursor::MoveCursorTo(const gfx::PointF& location) {
- MoveCursorTo(cursor_window_, location);
+ DriWindow* window =
+ window_manager_->GetWindowAt(gfx::ToFlooredPoint(location));
+ if (!window)
+ return;
+
+ MoveCursorTo(window->GetAcceleratedWidget(),
+ location - window->GetBounds().OffsetFromOrigin());
}
void DriCursor::MoveCursor(const gfx::Vector2dF& delta) {
« no previous file with comments | « ui/ozone/platform/caca/ozone_platform_caca.cc ('k') | ui/ozone/platform/dri/dri_window.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698