mirror of
https://github.com/brl/mutter.git
synced 2024-12-24 12:02:04 +00:00
monitor-config-manager: Verify the layout origin is at (0, 0)
The extent of the layout regions must be a rectangle positioned at (0, 0). https://bugzilla.gnome.org/show_bug.cgi?id=777732
This commit is contained in:
parent
2035f2f2e2
commit
68a6cc5976
@ -925,6 +925,7 @@ gboolean
|
|||||||
meta_verify_monitors_config (MetaMonitorsConfig *config,
|
meta_verify_monitors_config (MetaMonitorsConfig *config,
|
||||||
GError **error)
|
GError **error)
|
||||||
{
|
{
|
||||||
|
int min_x, min_y;
|
||||||
gboolean has_primary;
|
gboolean has_primary;
|
||||||
GList *region;
|
GList *region;
|
||||||
GList *l;
|
GList *l;
|
||||||
@ -936,6 +937,8 @@ meta_verify_monitors_config (MetaMonitorsConfig *config,
|
|||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
min_x = INT_MAX;
|
||||||
|
min_y = INT_MAX;
|
||||||
region = NULL;
|
region = NULL;
|
||||||
has_primary = FALSE;
|
has_primary = FALSE;
|
||||||
for (l = config->logical_monitor_configs; l; l = l->next)
|
for (l = config->logical_monitor_configs; l; l = l->next)
|
||||||
@ -970,11 +973,21 @@ meta_verify_monitors_config (MetaMonitorsConfig *config,
|
|||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
min_x = MIN (logical_monitor_config->layout.x, min_x);
|
||||||
|
min_y = MIN (logical_monitor_config->layout.y, min_y);
|
||||||
|
|
||||||
region = g_list_prepend (region, &logical_monitor_config->layout);
|
region = g_list_prepend (region, &logical_monitor_config->layout);
|
||||||
}
|
}
|
||||||
|
|
||||||
g_list_free (region);
|
g_list_free (region);
|
||||||
|
|
||||||
|
if (min_x != 0 || min_y != 0)
|
||||||
|
{
|
||||||
|
g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED,
|
||||||
|
"Logical monitors positions are offset");
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
if (!has_primary)
|
if (!has_primary)
|
||||||
{
|
{
|
||||||
g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED,
|
g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED,
|
||||||
|
Loading…
Reference in New Issue
Block a user