boxes: Fix spelling in API
Change adjecent to adjacent. https://gitlab.gnome.org/GNOME/mutter/merge_requests/496
This commit is contained in:
parent
c96cf0608d
commit
5d1eccfb6f
@ -1540,7 +1540,7 @@ meta_verify_logical_monitor_config (MetaLogicalMonitorConfig *logical_monitor
|
|||||||
}
|
}
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
has_adjecent_neighbour (MetaMonitorsConfig *config,
|
has_adjacent_neighbour (MetaMonitorsConfig *config,
|
||||||
MetaLogicalMonitorConfig *logical_monitor_config)
|
MetaLogicalMonitorConfig *logical_monitor_config)
|
||||||
{
|
{
|
||||||
GList *l;
|
GList *l;
|
||||||
@ -1559,7 +1559,7 @@ has_adjecent_neighbour (MetaMonitorsConfig *config,
|
|||||||
if (logical_monitor_config == other_logical_monitor_config)
|
if (logical_monitor_config == other_logical_monitor_config)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (meta_rectangle_is_adjecent_to (&logical_monitor_config->layout,
|
if (meta_rectangle_is_adjacent_to (&logical_monitor_config->layout,
|
||||||
&other_logical_monitor_config->layout))
|
&other_logical_monitor_config->layout))
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
@ -1665,10 +1665,10 @@ meta_verify_monitors_config (MetaMonitorsConfig *config,
|
|||||||
has_primary = TRUE;
|
has_primary = TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!has_adjecent_neighbour (config, logical_monitor_config))
|
if (!has_adjacent_neighbour (config, logical_monitor_config))
|
||||||
{
|
{
|
||||||
g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED,
|
g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED,
|
||||||
"Logical monitors not adjecent");
|
"Logical monitors not adjacent");
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -243,7 +243,7 @@ GList* meta_rectangle_find_nonintersected_monitor_edges (
|
|||||||
const GSList *all_struts);
|
const GSList *all_struts);
|
||||||
|
|
||||||
META_EXPORT_TEST
|
META_EXPORT_TEST
|
||||||
gboolean meta_rectangle_is_adjecent_to (MetaRectangle *rect,
|
gboolean meta_rectangle_is_adjacent_to (MetaRectangle *rect,
|
||||||
MetaRectangle *other);
|
MetaRectangle *other);
|
||||||
|
|
||||||
META_EXPORT_TEST
|
META_EXPORT_TEST
|
||||||
|
@ -2026,7 +2026,7 @@ meta_rectangle_find_nonintersected_monitor_edges (
|
|||||||
}
|
}
|
||||||
|
|
||||||
gboolean
|
gboolean
|
||||||
meta_rectangle_is_adjecent_to (MetaRectangle *rect,
|
meta_rectangle_is_adjacent_to (MetaRectangle *rect,
|
||||||
MetaRectangle *other)
|
MetaRectangle *other)
|
||||||
{
|
{
|
||||||
int rect_x1 = rect->x;
|
int rect_x1 = rect->x;
|
||||||
|
@ -185,10 +185,10 @@ meta_test_util_later_schedule_from_later (void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
meta_test_adjecent_to (void)
|
meta_test_adjacent_to (void)
|
||||||
{
|
{
|
||||||
MetaRectangle base = { .x = 10, .y = 10, .width = 10, .height = 10 };
|
MetaRectangle base = { .x = 10, .y = 10, .width = 10, .height = 10 };
|
||||||
MetaRectangle adjecent[] = {
|
MetaRectangle adjacent[] = {
|
||||||
{ .x = 20, .y = 10, .width = 10, .height = 10 },
|
{ .x = 20, .y = 10, .width = 10, .height = 10 },
|
||||||
{ .x = 0, .y = 10, .width = 10, .height = 10 },
|
{ .x = 0, .y = 10, .width = 10, .height = 10 },
|
||||||
{ .x = 0, .y = 1, .width = 10, .height = 10 },
|
{ .x = 0, .y = 1, .width = 10, .height = 10 },
|
||||||
@ -196,7 +196,7 @@ meta_test_adjecent_to (void)
|
|||||||
{ .x = 10, .y = 20, .width = 10, .height = 10 },
|
{ .x = 10, .y = 20, .width = 10, .height = 10 },
|
||||||
{ .x = 10, .y = 0, .width = 10, .height = 10 },
|
{ .x = 10, .y = 0, .width = 10, .height = 10 },
|
||||||
};
|
};
|
||||||
MetaRectangle not_adjecent[] = {
|
MetaRectangle not_adjacent[] = {
|
||||||
{ .x = 0, .y = 0, .width = 10, .height = 10 },
|
{ .x = 0, .y = 0, .width = 10, .height = 10 },
|
||||||
{ .x = 20, .y = 20, .width = 10, .height = 10 },
|
{ .x = 20, .y = 20, .width = 10, .height = 10 },
|
||||||
{ .x = 21, .y = 10, .width = 10, .height = 10 },
|
{ .x = 21, .y = 10, .width = 10, .height = 10 },
|
||||||
@ -207,11 +207,11 @@ meta_test_adjecent_to (void)
|
|||||||
};
|
};
|
||||||
unsigned int i;
|
unsigned int i;
|
||||||
|
|
||||||
for (i = 0; i < G_N_ELEMENTS (adjecent); i++)
|
for (i = 0; i < G_N_ELEMENTS (adjacent); i++)
|
||||||
g_assert (meta_rectangle_is_adjecent_to (&base, &adjecent[i]));
|
g_assert (meta_rectangle_is_adjacent_to (&base, &adjacent[i]));
|
||||||
|
|
||||||
for (i = 0; i < G_N_ELEMENTS (not_adjecent); i++)
|
for (i = 0; i < G_N_ELEMENTS (not_adjacent); i++)
|
||||||
g_assert (!meta_rectangle_is_adjecent_to (&base, ¬_adjecent[i]));
|
g_assert (!meta_rectangle_is_adjacent_to (&base, ¬_adjacent[i]));
|
||||||
}
|
}
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
@ -245,7 +245,7 @@ init_tests (int argc, char **argv)
|
|||||||
g_test_add_func ("/util/meta-later/schedule-from-later",
|
g_test_add_func ("/util/meta-later/schedule-from-later",
|
||||||
meta_test_util_later_schedule_from_later);
|
meta_test_util_later_schedule_from_later);
|
||||||
|
|
||||||
g_test_add_func ("/core/boxes/adjecent-to", meta_test_adjecent_to);
|
g_test_add_func ("/core/boxes/adjacent-to", meta_test_adjacent_to);
|
||||||
|
|
||||||
init_monitor_store_tests ();
|
init_monitor_store_tests ();
|
||||||
init_monitor_config_migration_tests ();
|
init_monitor_config_migration_tests ();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user