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

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

Issue 2857963003: Add {Lock,Unlock,Show,Hide}Cursor() to the window manager mojom. (Closed)
Patch Set: sky comments 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
« no previous file with comments | « services/ui/ws/window_manager_state.h ('k') | services/ui/ws/window_manager_state_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 00347db7ad2cc15ee378c6f95c68931436a10dd7..5810ac596f274b7791d9a0d0f4d79f8f8aeb8186 100644
--- a/services/ui/ws/window_manager_state.cc
+++ b/services/ui/ws/window_manager_state.cc
@@ -131,7 +131,9 @@ WindowManagerState::QueuedEvent::QueuedEvent() {}
WindowManagerState::QueuedEvent::~QueuedEvent() {}
WindowManagerState::WindowManagerState(WindowTree* window_tree)
- : window_tree_(window_tree), event_dispatcher_(this) {
+ : window_tree_(window_tree),
+ event_dispatcher_(this),
+ cursor_state_(window_tree_->display_manager()) {
frame_decoration_values_ = mojom::FrameDecorationValues::New();
frame_decoration_values_->max_title_bar_button_width = 0u;
@@ -601,8 +603,7 @@ void WindowManagerState::ReleaseNativeCapture() {
void WindowManagerState::UpdateNativeCursorFromDispatcher() {
const ui::CursorData cursor = event_dispatcher_.GetCurrentMouseCursor();
- for (Display* display : display_manager()->displays())
- display->UpdateNativeCursor(cursor);
+ cursor_state_.SetCurrentWindowCursor(cursor);
}
void WindowManagerState::OnCaptureChanged(ServerWindow* new_capture,
« no previous file with comments | « services/ui/ws/window_manager_state.h ('k') | services/ui/ws/window_manager_state_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698