| Index: chromeos/display/output_configurator.cc
|
| diff --git a/chromeos/display/output_configurator.cc b/chromeos/display/output_configurator.cc
|
| index 8bb89bfc6bb2f27b94483e94f262138f4880c872..86d0262d4d8afd5efc4c2c215cbb620e641cee39 100644
|
| --- a/chromeos/display/output_configurator.cc
|
| +++ b/chromeos/display/output_configurator.cc
|
| @@ -649,10 +649,12 @@ bool OutputConfigurator::CycleDisplayMode() {
|
| XRRFreeScreenResources(screen);
|
| XUngrabServer(display);
|
|
|
| - if (did_change)
|
| + if (did_change) {
|
| NotifyOnDisplayChanged();
|
| - else
|
| - FOR_EACH_OBSERVER(Observer, observers_, OnDisplayModeChangeFailed());
|
| + } else {
|
| + FOR_EACH_OBSERVER(
|
| + Observer, observers_, OnDisplayModeChangeFailed(next_state));
|
| + }
|
| return did_change;
|
| }
|
|
|
| @@ -754,10 +756,12 @@ bool OutputConfigurator::SetDisplayMode(OutputState new_state) {
|
| XRRFreeScreenResources(screen);
|
| XUngrabServer(display);
|
|
|
| - if (output_state_ == new_state)
|
| + if (output_state_ == new_state) {
|
| NotifyOnDisplayChanged();
|
| - else
|
| - FOR_EACH_OBSERVER(Observer, observers_, OnDisplayModeChangeFailed());
|
| + } else {
|
| + FOR_EACH_OBSERVER(
|
| + Observer, observers_, OnDisplayModeChangeFailed(new_state));
|
| + }
|
| return true;
|
| }
|
|
|
| @@ -828,6 +832,9 @@ void OutputConfigurator::ConfigureOutputs() {
|
| if (success) {
|
| output_state_ = new_state;
|
| NotifyOnDisplayChanged();
|
| + } else {
|
| + FOR_EACH_OBSERVER(
|
| + Observer, observers_, OnDisplayModeChangeFailed(new_state));
|
| }
|
| chromeos::DBusThreadManager::Get()->GetPowerManagerClient()->
|
| SetIsProjecting(is_projecting);
|
|
|