Commit 5497e716 authored by Marco Trevisan's avatar Marco Trevisan 🎺

monitor-config-manager: Reject a suggested config if there black areas

It could happen that monitors suggest to use coordinates that don't take in
consideration the scaling applied to one monitor, and such the generated
configuration is not valid because not all the monitors are adjacent.

So enforce this check before accepting a suggested configuration as it is.
parent 1ba9ceed
......@@ -821,6 +821,21 @@ meta_monitor_config_manager_create_suggested (MetaMonitorConfigManager *config_m
region = g_list_prepend (region, &logical_monitor_config->layout);
for (l = region; region->next && l; l = l->next)
MetaRectangle *rect = l->data;
if (!meta_rectangle_has_adjacent_in_region (region, rect))
g_warning ("Suggested monitor config has monitors with no neighbors, "
g_list_free (region);
g_list_free_full (logical_monitor_configs,
(GDestroyNotify) meta_logical_monitor_config_free);
return NULL;
g_list_free (region);
if (!logical_monitor_configs)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment