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

Unified Diff: services/ui/ws/display.cc

Issue 2830703003: [views-mus] Support custom cursors. (Closed)
Patch Set: fix cast_shell_linux Created 3 years, 8 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
« no previous file with comments | « services/ui/ws/display.h ('k') | services/ui/ws/drag_controller.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: services/ui/ws/display.cc
diff --git a/services/ui/ws/display.cc b/services/ui/ws/display.cc
index 98c6cfad66c810d05b30c57c59760f0696bb0a58..becd40ed97784b72dbada881f97b3c6838de21e2 100644
--- a/services/ui/ws/display.cc
+++ b/services/ui/ws/display.cc
@@ -37,7 +37,8 @@ namespace ui {
namespace ws {
Display::Display(WindowServer* window_server)
- : window_server_(window_server), last_cursor_(mojom::CursorType::kNull) {
+ : window_server_(window_server),
+ last_cursor_(ui::CursorData(ui::CursorType::kNull)) {
window_server_->window_manager_window_tree_factory_set()->AddObserver(this);
window_server_->user_id_tracker()->AddObserver(this);
}
@@ -197,10 +198,10 @@ void Display::RemoveWindowManagerDisplayRoot(
NOTREACHED();
}
-void Display::UpdateNativeCursor(mojom::CursorType cursor_id) {
- if (cursor_id != last_cursor_) {
- platform_display_->SetCursorById(cursor_id);
- last_cursor_ = cursor_id;
+void Display::UpdateNativeCursor(const ui::CursorData& cursor) {
+ if (!last_cursor_.IsSameAs(cursor)) {
+ platform_display_->SetCursor(cursor);
+ last_cursor_ = cursor;
}
}
« no previous file with comments | « services/ui/ws/display.h ('k') | services/ui/ws/drag_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698