| Index: monitor_reconfigure_main.cc
|
| diff --git a/monitor_reconfigure_main.cc b/monitor_reconfigure_main.cc
|
| index 64c7058fdb4f9edb5b3362f808470728f57882ae..664b05f33d279248c0e66c60441724c9f70d0ea4 100644
|
| --- a/monitor_reconfigure_main.cc
|
| +++ b/monitor_reconfigure_main.cc
|
| @@ -52,14 +52,20 @@ void MonitorReconfigureMain::Run() {
|
| &lcd_resolution,
|
| &external_resolution,
|
| &screen_resolution));
|
| + CHECK(!lcd_resolution.empty() || !external_resolution.empty());
|
|
|
| - SetDeviceResolution(lcd_output_->name, lcd_resolution);
|
| + // Disable the LCD if we were told to do so (because we're using a higher
|
| + // resolution that'd be clipped on the LCD).
|
| + if (!lcd_resolution.empty())
|
| + SetDeviceResolution(lcd_output_->name, lcd_resolution);
|
| + else
|
| + DisableDevice(lcd_output_->name);
|
|
|
| // If there's no external output connected, disable the device before we try
|
| // to set the screen resolution; otherwise xrandr will complain if we're
|
| // trying to set the screen to a smaller size than what the now-unplugged
|
| // device was using.
|
| - if (IsExternalMonitorConnected())
|
| + if (!external_resolution.empty())
|
| SetDeviceResolution(external_output_->name, external_resolution);
|
| else
|
| DisableDevice(external_output_->name);
|
|
|