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

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: Do it the other way + explicit checks that it is a mouse pointer. 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
« no previous file with comments | « ui/platform_window/x11/x11_window.cc ('k') | ui/views/mus/platform_window_mus.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 240245813f86b72dca3bec0a7ebdc9190755d185..4a1d77dad9865bb9fbf91ab72af0ee3762cacfd0 100644
--- a/ui/views/mus/native_widget_mus.cc
+++ b/ui/views/mus/native_widget_mus.cc
@@ -589,7 +589,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 {
« no previous file with comments | « ui/platform_window/x11/x11_window.cc ('k') | ui/views/mus/platform_window_mus.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698