Index: services/ui/ws/window_server.cc |
diff --git a/services/ui/ws/window_server.cc b/services/ui/ws/window_server.cc |
index 3a46d4db3178b08b44c7b33ad70d372c6f0da0c3..9920972887ec796d8c13d06f5826151fe1c73d32 100644 |
--- a/services/ui/ws/window_server.cc |
+++ b/services/ui/ws/window_server.cc |
@@ -598,9 +598,8 @@ void WindowServer::UpdateNativeCursorFromMouseLocation(ServerWindow* window) { |
if (display_root) { |
EventDispatcher* event_dispatcher = |
display_root->window_manager_state()->event_dispatcher(); |
- event_dispatcher->UpdateCursorProviderByLastKnownLocation(); |
- display_root->display()->UpdateNativeCursor( |
- event_dispatcher->GetCurrentMouseCursor()); |
+ event_dispatcher->UpdateCursorProviderByLastKnownLocation(base::Bind( |
+ &WindowServer::OnCursorUpdated, base::Unretained(this), display_root)); |
} |
} |
@@ -615,9 +614,15 @@ void WindowServer::UpdateNativeCursorIfOver(ServerWindow* window) { |
if (window != event_dispatcher->GetWindowForMouseCursor()) |
return; |
- event_dispatcher->UpdateNonClientAreaForCurrentWindow(); |
+ event_dispatcher->UpdateNonClientAreaForCurrentWindow(base::Bind( |
+ &WindowServer::OnCursorUpdated, base::Unretained(this), display_root)); |
+} |
+ |
+void WindowServer::OnCursorUpdated(WindowManagerDisplayRoot* display_root) { |
display_root->display()->UpdateNativeCursor( |
- event_dispatcher->GetCurrentMouseCursor()); |
+ display_root->window_manager_state() |
+ ->event_dispatcher() |
+ ->GetCurrentMouseCursor()); |
} |
bool WindowServer::IsUserInHighContrastMode(const UserId& user) const { |