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

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: const 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/cursor_location_manager.cc ('k') | services/ui/ws/event_dispatcher.h » ('j') | no next file with comments »
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 a182f271fa086b7e2270ca959e263c616ba45b4d..e64964b5fc5131759b1df21c5bf7d683c717a9f4 100644
--- a/services/ui/ws/display_manager.cc
+++ b/services/ui/ws/display_manager.cc
@@ -304,17 +304,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::CreateDisplay(const display::Display& display,
« no previous file with comments | « services/ui/ws/cursor_location_manager.cc ('k') | services/ui/ws/event_dispatcher.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698