diff options
author | oshima@chromium.org <oshima@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-03-06 01:43:50 +0000 |
---|---|---|
committer | oshima@chromium.org <oshima@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-03-06 01:43:50 +0000 |
commit | ca0eca8d335d68c507a136e751b43f422a70cbed (patch) | |
tree | bd46483e9c8fe95f946e6ed78375a0d6b8f529c4 /ash | |
parent | 4ae9968402a38d2fcfd610ddcf7e653e21ff8802 (diff) | |
download | chromium_src-ca0eca8d335d68c507a136e751b43f422a70cbed.zip chromium_src-ca0eca8d335d68c507a136e751b43f422a70cbed.tar.gz chromium_src-ca0eca8d335d68c507a136e751b43f422a70cbed.tar.bz2 |
Fallback to use output_index when searching for internal display
BUG=180100
TEST=manual
Review URL: https://chromiumcodereview.appspot.com/12491005
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@186322 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ash')
-rw-r--r-- | ash/display/display_change_observer_x11.cc | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/ash/display/display_change_observer_x11.cc b/ash/display/display_change_observer_x11.cc index 7ba4af4..1bbccaf 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; } } |