| Index: monitor_reconfigure_main.cc
|
| diff --git a/monitor_reconfigure_main.cc b/monitor_reconfigure_main.cc
|
| index 664b05f33d279248c0e66c60441724c9f70d0ea4..bfabae7731e44a35fdf073ac7cae248300a98b1f 100644
|
| --- a/monitor_reconfigure_main.cc
|
| +++ b/monitor_reconfigure_main.cc
|
| @@ -56,21 +56,28 @@ void MonitorReconfigureMain::Run() {
|
|
|
| // 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
|
| + if (lcd_resolution.empty())
|
| 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 (!external_resolution.empty())
|
| - SetDeviceResolution(external_output_->name, external_resolution);
|
| - else
|
| + if (external_resolution.empty())
|
| DisableDevice(external_output_->name);
|
|
|
| + // Set the fb to try to avoid the driver's "crtc has no fb" message.
|
| + // Doing this before enabling the display reduces the likelihood of a
|
| + // visible "snap" when returning to the panel.
|
| SetScreenResolution(screen_resolution);
|
| +
|
| + // Enable the LCD if appropriate.
|
| + if (!lcd_resolution.empty())
|
| + SetDeviceResolution(lcd_output_->name, lcd_resolution);
|
| +
|
| + // Enable the external device if appropriate.
|
| + if (!external_resolution.empty())
|
| + SetDeviceResolution(external_output_->name, external_resolution);
|
| }
|
|
|
| void MonitorReconfigureMain::DetermineOutputs() {
|
|
|