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

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: . 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 | « no previous file | services/ui/ws/event_dispatcher.h » ('j') | services/ui/ws/event_dispatcher.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: services/ui/ws/display_manager.cc
diff --git a/services/ui/ws/display_manager.cc b/services/ui/ws/display_manager.cc
index 286993ece49f719e85e779983db9d3e10b488f2e..aa80c884875262e7876b1ce3b9ffebd686a1abca 100644
--- a/services/ui/ws/display_manager.cc
+++ b/services/ui/ws/display_manager.cc
@@ -196,17 +196,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,
« no previous file with comments | « no previous file | services/ui/ws/event_dispatcher.h » ('j') | services/ui/ws/event_dispatcher.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698