Index: ash/display/display_manager.cc |
diff --git a/ash/display/display_manager.cc b/ash/display/display_manager.cc |
index f67c62faaccf72375d68f131e45da62748c47794..09d084e9817dc3a4a3d0019fbccbe2bad154bf23 100644 |
--- a/ash/display/display_manager.cc |
+++ b/ash/display/display_manager.cc |
@@ -673,12 +673,13 @@ void DisplayManager::UpdateDisplays( |
std::sort(new_display_info_list.begin(), |
new_display_info_list.end(), |
DisplayInfoSortFunctor()); |
+ |
+ CreateSoftwareMirroringDisplayInfo(&new_display_info_list); |
+ |
// Close the mirroring window if any here to avoid creating two compositor on |
// one display. |
if (delegate_) |
- delegate_->CloseMirroringDisplay(); |
- |
- CreateSoftwareMirroringDisplay(&new_display_info_list); |
+ delegate_->CloseMirroringDisplayIfNotNecessary(); |
DisplayList new_displays; |
DisplayList removed_displays; |
@@ -1083,7 +1084,7 @@ void DisplayManager::UpdateInternalDisplayModeListForTest() { |
SetInternalDisplayModeList(info); |
} |
-void DisplayManager::CreateSoftwareMirroringDisplay( |
+void DisplayManager::CreateSoftwareMirroringDisplayInfo( |
DisplayInfoList* display_info_list) { |
// Use the internal display or 1st as the mirror source, then scale |
// the root window so that it matches the external display's |