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

Unified Diff: ui/views/mus/native_widget_mus.cc

Issue 1465803003: mus: Let clients set the cursor of their window. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Sync pass the nacl breakage Created 5 years 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/views/mus/native_widget_mus.cc
diff --git a/ui/views/mus/native_widget_mus.cc b/ui/views/mus/native_widget_mus.cc
index 042f853545efc1335db7abfd1d0a118b7ba3879d..95970c1446f0ac25245a649d087735585061b6f0 100644
--- a/ui/views/mus/native_widget_mus.cc
+++ b/ui/views/mus/native_widget_mus.cc
@@ -595,7 +595,14 @@ void NativeWidgetMus::SchedulePaintInRect(const gfx::Rect& rect) {
}
void NativeWidgetMus::SetCursor(gfx::NativeCursor cursor) {
- // NOTIMPLEMENTED();
+ // TODO(erg): In aura, our incoming cursor is really two
+ // parts. cursor.native_type() is an integer for standard cursors and is all
+ // we support right now. If native_type() == kCursorCustom, than we should
+ // also send an image, but as the cursor code is currently written, the image
+ // is in a platform native format that's already uploaded to the window
+ // server.
+ window_tree_host_->platform_window()->SetCursorById(
+ mus::mojom::Cursor(cursor.native_type()));
}
bool NativeWidgetMus::IsMouseEventsEnabled() const {

Powered by Google App Engine
This is Rietveld 408576698