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

Unified Diff: ash/display/extended_mouse_warp_controller.cc

Issue 1827083003: Address comments in the orignial CL (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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 | « ash/display/extended_mouse_warp_controller.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/display/extended_mouse_warp_controller.cc
diff --git a/ash/display/extended_mouse_warp_controller.cc b/ash/display/extended_mouse_warp_controller.cc
index 26a199dd27277132ab0f1a48171f0cc889ef2f4a..6e5273f35a035bb822713cf53e544097636934c2 100644
--- a/ash/display/extended_mouse_warp_controller.cc
+++ b/ash/display/extended_mouse_warp_controller.cc
@@ -104,7 +104,11 @@ ExtendedMouseWarpController::ExtendedMouseWarpController(
int64_t drag_source_id = drag_source ? GetDisplayIdFromWindow(drag_source)
: gfx::Display::kInvalidDisplayID;
DisplayList display_list = display_manager->active_display_list();
- while (display_list.size() > 0) {
+ // Try to create a Warp region for all possible two displays combination.
+ // The following code does it by poping the last element in the list
+ // and then pairing with remaining displays in the list, until the list
+ // becomes single element.
+ while (display_list.size() > 1) {
gfx::Display display = display_list.back();
display_list.pop_back();
for (const gfx::Display& peer : display_list) {
« no previous file with comments | « ash/display/extended_mouse_warp_controller.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698