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

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

Issue 2884463002: Make event-targeting asynchronous in window server. (Closed)
Patch Set: 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
« services/ui/ws/event_dispatcher.cc ('K') | « services/ui/ws/window_server.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 {
« services/ui/ws/event_dispatcher.cc ('K') | « services/ui/ws/window_server.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698