monitor-config-manager: Handle headless setup gracefully

Handle headless setup gracefully by having no logical monitors. This
commit only makes the monitor management code deal with it; other areas
may still not be able to handle it.

https://bugzilla.gnome.org/show_bug.cgi?id=777732
This commit is contained in:
Jonas Ådahl
2017-01-12 13:47:54 +08:00
parent f45e7703ba
commit 3f994646f2
4 changed files with 55 additions and 22 deletions

View File

@ -1499,6 +1499,13 @@ meta_monitor_manager_kms_apply_monitors_config (MetaMonitorManager *manager,
GPtrArray *crtc_infos;
GPtrArray *output_infos;
if (!config)
{
manager->screen_width = 0;
manager->screen_height = 0;
return TRUE;
}
if (!meta_monitor_config_manager_assign (manager, config,
&crtc_infos, &output_infos,
error))