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

Unified Diff: ash/display/display_change_observer_x11.cc

Issue 12491005: Fallback to use output_index when searching for internal display (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix comment Created 7 years, 10 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/display/display_change_observer_x11.cc
diff --git a/ash/display/display_change_observer_x11.cc b/ash/display/display_change_observer_x11.cc
index 7ba4af4eb203a441b35b0cba224dcd22939b7b60..1bbccafe2b75bc9f2ebe0b1620adecceb5834836 100644
--- a/ash/display/display_change_observer_x11.cc
+++ b/ash/display/display_change_observer_x11.cc
@@ -119,9 +119,10 @@ DisplayChangeObserverX11::DisplayChangeObserverX11()
std::string(output_info->name));
XRRFreeOutputInfo(output_info);
if (is_internal) {
- // No need to check the return value of |GetDisplayID()| as
- // the default value is |gfx::Display::kInvalidDisplayID| anyway.
- gfx::Display::SetInternalDisplayId(GetDisplayId(output, output_index));
+ int64 id = GetDisplayId(output, output_index);
+ // Fallback to output index. crbug.com/180100
+ gfx::Display::SetInternalDisplayId(
+ id == gfx::Display::kInvalidDisplayID ? output_index : id);
break;
}
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698