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

Unified Diff: services/ui/ws/window_manager_state.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: services/ui/ws/window_manager_state.cc
diff --git a/services/ui/ws/window_manager_state.cc b/services/ui/ws/window_manager_state.cc
index a36a9b1f252662b0457bd0507bbff40b44787f85..eec946760385723df96e39512c1fac962a836dd7 100644
--- a/services/ui/ws/window_manager_state.cc
+++ b/services/ui/ws/window_manager_state.cc
@@ -192,6 +192,20 @@ void WindowManagerState::ReleaseCaptureBlockedByAnyModalWindow() {
event_dispatcher_.ReleaseCaptureBlockedByAnyModalWindow();
}
+void WindowManagerState::SetCursorLocation(const gfx::Point& display_pixels,
+ int64_t display_id) {
+ Display* display = display_manager()->GetDisplayById(display_id);
+ if (!display) {
+ NOTIMPLEMENTED() << "Window manager sent invalid display_id!";
+ return;
+ }
+
+ event_dispatcher()->SetMousePointerDisplayLocation(display_pixels,
+ display_id);
+ UpdateNativeCursorFromDispatcher();
+ display->platform_display()->MoveCursorTo(display_pixels);
+}
+
void WindowManagerState::SetDragDropSourceWindow(
DragSource* drag_source,
ServerWindow* window,

Powered by Google App Engine
This is Rietveld 408576698