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; |
} |
} |