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

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

Issue 2778943005: Keep root_location to be in pixels and display coordinates in WS. (Closed)
Patch Set: TODO 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
Index: services/ui/ws/display_manager.cc
diff --git a/services/ui/ws/display_manager.cc b/services/ui/ws/display_manager.cc
index 6575884cac1209f67717c14e972e2202cd1eae76..9832ab16679f4f7a1d6d91c8dca13bbbaacf88ae 100644
--- a/services/ui/ws/display_manager.cc
+++ b/services/ui/ws/display_manager.cc
@@ -199,17 +199,22 @@ void DisplayManager::OnActiveUserIdChanged(const UserId& previously_active_id,
const UserId& active_id) {
WindowManagerState* previous_window_manager_state =
window_server_->GetWindowManagerStateForUser(previously_active_id);
- gfx::Point mouse_location_on_screen;
+ gfx::Point mouse_location_on_display;
+ int64_t mouse_display_id = 0;
if (previous_window_manager_state) {
- mouse_location_on_screen = previous_window_manager_state->event_dispatcher()
- ->mouse_pointer_last_location();
+ mouse_location_on_display =
+ previous_window_manager_state->event_dispatcher()
+ ->mouse_pointer_last_location();
+ mouse_display_id = previous_window_manager_state->event_dispatcher()
+ ->mouse_pointer_display_id();
previous_window_manager_state->Deactivate();
}
WindowManagerState* current_window_manager_state =
window_server_->GetWindowManagerStateForUser(active_id);
if (current_window_manager_state)
- current_window_manager_state->Activate(mouse_location_on_screen);
+ current_window_manager_state->Activate(mouse_location_on_display,
+ mouse_display_id);
}
void DisplayManager::OnDisplayAdded(const display::Display& display,

Powered by Google App Engine
This is Rietveld 408576698