Chromium Code Reviews| Index: chromeos/display/output_configurator.cc |
| diff --git a/chromeos/display/output_configurator.cc b/chromeos/display/output_configurator.cc |
| index c8de844520115706277f8a20a5eeae159a3ff983..7aa594d7221196c2c76e87f67709e161d2b277e8 100644 |
| --- a/chromeos/display/output_configurator.cc |
| +++ b/chromeos/display/output_configurator.cc |
| @@ -242,20 +242,24 @@ bool OutputConfigurator::SetDisplayPower(DisplayPowerState power_state, |
| std::vector<OutputSnapshot> outputs = |
| delegate_->GetOutputs(state_controller_); |
| + bool changed = false; |
| bool only_if_single_internal_display = |
| flags & kSetDisplayPowerOnlyIfSingleInternalDisplay; |
| bool single_internal_display = outputs.size() == 1 && outputs[0].is_internal; |
| if ((single_internal_display || !only_if_single_internal_display) && |
| EnterStateOrFallBackToSoftwareMirroring( |
| GetOutputState(outputs, power_state), power_state, outputs)) { |
| - if (power_state != DISPLAY_POWER_ALL_OFF) { |
| - // Force the DPMS on since the driver doesn't always detect that it |
| - // should turn on. This is needed when coming back from idle suspend. |
| + // Force the DPMS on since the driver doesn't always detect that it |
| + // should turn on. This is needed when coming back from idle suspend. |
| + if (power_state != DISPLAY_POWER_ALL_OFF) |
| delegate_->ForceDPMSOn(); |
| - } |
| + |
| + changed = true; |
| } |
| delegate_->UngrabServer(); |
| + if (changed) |
| + NotifyOnDisplayChanged(); |
|
Daniel Erat
2013/08/16 00:51:46
I don't think that we need to notify about failure
|
| return true; |
| } |