monitor-manager: Let the backends handle no configuration
Let the backends decide whether to just rebuild a derived state, or use the NULL config to rebuild an empty logical state. This also changes the expected screen size values of the no-outputs test; as this case is actually handled now. https://bugzilla.gnome.org/show_bug.cgi?id=777732
This commit is contained in:
parent
4e03e89869
commit
fcc0288f0c
@ -501,6 +501,14 @@ meta_monitor_manager_dummy_apply_monitors_config (MetaMonitorManager *manager,
|
||||
GPtrArray *crtc_infos;
|
||||
GPtrArray *output_infos;
|
||||
|
||||
if (!config)
|
||||
{
|
||||
manager->screen_width = 0;
|
||||
manager->screen_height = 0;
|
||||
|
||||
meta_monitor_manager_rebuild (manager, NULL);
|
||||
}
|
||||
|
||||
if (!meta_monitor_config_manager_assign (manager, config,
|
||||
&crtc_infos, &output_infos,
|
||||
error))
|
||||
|
@ -420,7 +420,7 @@ done:
|
||||
|
||||
if (!config)
|
||||
{
|
||||
meta_monitor_manager_rebuild (manager, NULL);
|
||||
meta_monitor_manager_apply_monitors_config (manager, NULL, &error);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
@ -1430,6 +1430,7 @@ meta_monitor_manager_kms_apply_monitors_config (MetaMonitorManager *manager,
|
||||
{
|
||||
manager->screen_width = 0;
|
||||
manager->screen_height = 0;
|
||||
meta_monitor_manager_rebuild (manager, NULL);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
@ -1303,6 +1303,12 @@ meta_monitor_manager_xrandr_apply_monitors_config (MetaMonitorManager *manager,
|
||||
GPtrArray *crtc_infos;
|
||||
GPtrArray *output_infos;
|
||||
|
||||
if (!config)
|
||||
{
|
||||
meta_monitor_manager_rebuild_derived (manager);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
if (!meta_monitor_config_manager_assign (manager, config,
|
||||
&crtc_infos, &output_infos,
|
||||
error))
|
||||
|
@ -258,6 +258,17 @@ meta_monitor_manager_test_apply_monitors_config (MetaMonitorManager *manager,
|
||||
GPtrArray *crtc_infos;
|
||||
GPtrArray *output_infos;
|
||||
|
||||
if (!config)
|
||||
{
|
||||
/* The screen is made 1x1, as clutter stage used cannot be empty. */
|
||||
manager->screen_width = 1;
|
||||
manager->screen_height = 1;
|
||||
|
||||
meta_monitor_manager_rebuild (manager, NULL);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
if (!meta_monitor_config_manager_assign (manager, config,
|
||||
&crtc_infos,
|
||||
&output_infos,
|
||||
|
@ -2135,8 +2135,9 @@ meta_test_monitor_no_outputs (void)
|
||||
.n_outputs = 0,
|
||||
.n_crtcs = 0,
|
||||
.n_tiled_monitors = 0,
|
||||
.screen_width = 1024,
|
||||
.screen_height = 768
|
||||
/* The screen is made 1x1, as clutter stage used cannot be empty. */
|
||||
.screen_width = 1,
|
||||
.screen_height = 1
|
||||
}
|
||||
};
|
||||
MetaMonitorTestSetup *test_setup;
|
||||
|
Loading…
Reference in New Issue
Block a user