mirror of
https://github.com/brl/mutter.git
synced 2025-06-14 01:09:30 +00:00
mutter: Completely replace MetaRectangle with MtkRectangle
There are still various helpers that might be worth to move to mtk as well Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3128>
This commit is contained in:
@ -41,7 +41,7 @@ init_random_ness (void)
|
||||
}
|
||||
|
||||
static void
|
||||
get_random_rect (MetaRectangle *rect)
|
||||
get_random_rect (MtkRectangle *rect)
|
||||
{
|
||||
rect->x = rand () % 1600;
|
||||
rect->y = rand () % 1200;
|
||||
@ -93,7 +93,7 @@ new_monitor_edge (int x, int y, int width, int height, int side_type)
|
||||
static void
|
||||
test_init_rect (void)
|
||||
{
|
||||
MetaRectangle rect;
|
||||
MtkRectangle rect;
|
||||
|
||||
rect = MTK_RECTANGLE_INIT (1, 2, 3, 4);
|
||||
g_assert_cmpint (rect.x, ==, 1);
|
||||
@ -105,7 +105,7 @@ test_init_rect (void)
|
||||
static void
|
||||
test_area (void)
|
||||
{
|
||||
MetaRectangle temp;
|
||||
MtkRectangle temp;
|
||||
int i;
|
||||
for (i = 0; i < NUM_RANDOM_RUNS; i++)
|
||||
{
|
||||
@ -120,13 +120,13 @@ test_area (void)
|
||||
static void
|
||||
test_intersect (void)
|
||||
{
|
||||
MetaRectangle a = {100, 200, 50, 40};
|
||||
MetaRectangle b = { 0, 50, 110, 152};
|
||||
MetaRectangle c = { 0, 0, 10, 10};
|
||||
MetaRectangle d = {100, 100, 50, 50};
|
||||
MetaRectangle b_intersect_d = {100, 100, 10, 50};
|
||||
MetaRectangle temp;
|
||||
MetaRectangle temp2;
|
||||
MtkRectangle a = {100, 200, 50, 40};
|
||||
MtkRectangle b = { 0, 50, 110, 152};
|
||||
MtkRectangle c = { 0, 0, 10, 10};
|
||||
MtkRectangle d = {100, 100, 50, 50};
|
||||
MtkRectangle b_intersect_d = {100, 100, 10, 50};
|
||||
MtkRectangle temp;
|
||||
MtkRectangle temp2;
|
||||
|
||||
mtk_rectangle_intersect (&a, &b, &temp);
|
||||
temp2 = MTK_RECTANGLE_INIT (100, 200, 10, 2);
|
||||
@ -146,12 +146,12 @@ test_intersect (void)
|
||||
static void
|
||||
test_equal (void)
|
||||
{
|
||||
MetaRectangle a = {10, 12, 4, 18};
|
||||
MetaRectangle b = a;
|
||||
MetaRectangle c = {10, 12, 4, 19};
|
||||
MetaRectangle d = {10, 12, 7, 18};
|
||||
MetaRectangle e = {10, 62, 4, 18};
|
||||
MetaRectangle f = {27, 12, 4, 18};
|
||||
MtkRectangle a = {10, 12, 4, 18};
|
||||
MtkRectangle b = a;
|
||||
MtkRectangle c = {10, 12, 4, 19};
|
||||
MtkRectangle d = {10, 12, 7, 18};
|
||||
MtkRectangle e = {10, 62, 4, 18};
|
||||
MtkRectangle f = {27, 12, 4, 18};
|
||||
|
||||
g_assert ( mtk_rectangle_equal (&a, &b));
|
||||
g_assert (!mtk_rectangle_equal (&a, &c));
|
||||
@ -163,7 +163,7 @@ test_equal (void)
|
||||
static void
|
||||
test_overlap_funcs (void)
|
||||
{
|
||||
MetaRectangle temp1, temp2;
|
||||
MtkRectangle temp1, temp2;
|
||||
int i;
|
||||
for (i = 0; i < NUM_RANDOM_RUNS; i++)
|
||||
{
|
||||
@ -184,7 +184,7 @@ test_overlap_funcs (void)
|
||||
static void
|
||||
test_basic_fitting (void)
|
||||
{
|
||||
MetaRectangle temp1, temp2, temp3;
|
||||
MtkRectangle temp1, temp2, temp3;
|
||||
int i;
|
||||
/* Four cases:
|
||||
* case temp1 fits temp2 temp1 could fit temp2
|
||||
@ -274,7 +274,7 @@ get_screen_region (int which)
|
||||
{
|
||||
GList *ret;
|
||||
GSList *struts;
|
||||
MetaRectangle basic_rect;
|
||||
MtkRectangle basic_rect;
|
||||
|
||||
basic_rect = MTK_RECTANGLE_INIT (0, 0, 1600, 1200);
|
||||
ret = NULL;
|
||||
@ -291,7 +291,7 @@ get_screen_edges (int which)
|
||||
{
|
||||
GList *ret;
|
||||
GSList *struts;
|
||||
MetaRectangle basic_rect;
|
||||
MtkRectangle basic_rect;
|
||||
|
||||
basic_rect = MTK_RECTANGLE_INIT (0, 0, 1600, 1200);
|
||||
ret = NULL;
|
||||
@ -382,14 +382,14 @@ test_merge_regions (void)
|
||||
|
||||
while (compare && compare->next)
|
||||
{
|
||||
MetaRectangle *a = compare->data;
|
||||
MtkRectangle *a = compare->data;
|
||||
GList *other = compare->next;
|
||||
|
||||
g_assert (a->width > 0 && a->height > 0);
|
||||
|
||||
while (other)
|
||||
{
|
||||
MetaRectangle *b = other->data;
|
||||
MtkRectangle *b = other->data;
|
||||
GList *delete_me = NULL;
|
||||
|
||||
g_assert (b->width > 0 && b->height > 0);
|
||||
@ -469,7 +469,7 @@ test_merge_regions (void)
|
||||
if (delete_me != NULL)
|
||||
{
|
||||
#ifdef PRINT_DEBUG
|
||||
MetaRectangle *bla = delete_me->data;
|
||||
MtkRectangle *bla = delete_me->data;
|
||||
printf (" Deleting rect %s\n",
|
||||
meta_rectangle_to_string (bla, rect1));
|
||||
#endif
|
||||
@ -525,8 +525,8 @@ verify_lists_are_equal (GList *code, GList *answer)
|
||||
|
||||
while (code && answer)
|
||||
{
|
||||
MetaRectangle *a = code->data;
|
||||
MetaRectangle *b = answer->data;
|
||||
MtkRectangle *a = code->data;
|
||||
MtkRectangle *b = answer->data;
|
||||
|
||||
if (a->x != b->x ||
|
||||
a->y != b->y ||
|
||||
@ -549,7 +549,7 @@ verify_lists_are_equal (GList *code, GList *answer)
|
||||
/* Ought to be at the end of both lists; check if we aren't */
|
||||
if (code)
|
||||
{
|
||||
MetaRectangle *tmp = code->data;
|
||||
MtkRectangle *tmp = code->data;
|
||||
g_error ("code list longer than answer list by %d items; "
|
||||
"first extra item: %d,%d +%d,%d\n",
|
||||
g_list_length (code),
|
||||
@ -558,7 +558,7 @@ verify_lists_are_equal (GList *code, GList *answer)
|
||||
|
||||
if (answer)
|
||||
{
|
||||
MetaRectangle *tmp = answer->data;
|
||||
MtkRectangle *tmp = answer->data;
|
||||
g_error ("answer list longer than code list by %d items; "
|
||||
"first extra item: %d,%d +%d,%d\n",
|
||||
g_list_length (answer),
|
||||
@ -656,7 +656,7 @@ static void
|
||||
test_region_fitting (void)
|
||||
{
|
||||
GList *region;
|
||||
MetaRectangle rect;
|
||||
MtkRectangle rect;
|
||||
|
||||
/* See test_basic_fitting() for how/why these automated random tests work */
|
||||
int i;
|
||||
@ -698,8 +698,8 @@ static void
|
||||
test_clamping_to_region (void)
|
||||
{
|
||||
GList *region;
|
||||
MetaRectangle rect;
|
||||
MetaRectangle min_size;
|
||||
MtkRectangle rect;
|
||||
MtkRectangle min_size;
|
||||
FixedDirections fixed_directions;
|
||||
int i;
|
||||
|
||||
@ -709,7 +709,7 @@ test_clamping_to_region (void)
|
||||
region = get_screen_region (3);
|
||||
for (i = 0; i < NUM_RANDOM_RUNS; i++)
|
||||
{
|
||||
MetaRectangle temp;
|
||||
MtkRectangle temp;
|
||||
get_random_rect (&rect);
|
||||
temp = rect;
|
||||
meta_rectangle_clamp_to_fit_into_region (region,
|
||||
@ -796,7 +796,7 @@ test_clamping_to_region (void)
|
||||
|
||||
static gboolean
|
||||
rect_overlaps_region (const GList *spanning_rects,
|
||||
const MetaRectangle *rect)
|
||||
const MtkRectangle *rect)
|
||||
{
|
||||
/* FIXME: Should I move this to boxes.[ch]? */
|
||||
const GList *temp;
|
||||
@ -819,7 +819,7 @@ static void
|
||||
test_clipping_to_region (void)
|
||||
{
|
||||
GList *region;
|
||||
MetaRectangle rect, temp;
|
||||
MtkRectangle rect, temp;
|
||||
FixedDirections fixed_directions = 0;
|
||||
int i;
|
||||
|
||||
@ -879,7 +879,7 @@ static void
|
||||
test_shoving_into_region (void)
|
||||
{
|
||||
GList *region;
|
||||
MetaRectangle rect, temp;
|
||||
MtkRectangle rect, temp;
|
||||
FixedDirections fixed_directions = 0;
|
||||
int i;
|
||||
|
||||
@ -1211,7 +1211,7 @@ test_find_nonintersected_monitor_edges (void)
|
||||
static void
|
||||
test_gravity_resize (void)
|
||||
{
|
||||
MetaRectangle oldrect, rect, temp;
|
||||
MtkRectangle oldrect, rect, temp;
|
||||
|
||||
rect.x = -500; /* Some random amount not equal to oldrect.x to ensure that
|
||||
* the resize is done with respect to oldrect instead of rect
|
||||
|
@ -121,7 +121,7 @@ meta_get_mode_fixed_rect_16 (MetaKmsMode *mode)
|
||||
meta_kms_mode_get_height (mode));
|
||||
}
|
||||
|
||||
MetaRectangle
|
||||
MtkRectangle
|
||||
meta_get_mode_rect (MetaKmsMode *mode)
|
||||
{
|
||||
return MTK_RECTANGLE_INIT (0, 0,
|
||||
|
@ -38,4 +38,4 @@ MetaDrmBuffer * meta_create_test_mode_dumb_buffer (MetaKmsDevice *device,
|
||||
|
||||
MetaFixed16Rectangle meta_get_mode_fixed_rect_16 (MetaKmsMode *mode);
|
||||
|
||||
MetaRectangle meta_get_mode_rect (MetaKmsMode *mode);
|
||||
MtkRectangle meta_get_mode_rect (MetaKmsMode *mode);
|
||||
|
@ -208,7 +208,7 @@ check_current_monitor_mode (MetaMonitor *monitor,
|
||||
|
||||
static MetaLogicalMonitor *
|
||||
logical_monitor_from_layout (MetaMonitorManager *monitor_manager,
|
||||
MetaRectangle *layout)
|
||||
MtkRectangle *layout)
|
||||
{
|
||||
GList *l;
|
||||
|
||||
|
@ -165,7 +165,7 @@ typedef struct _MonitorTestCaseMonitor
|
||||
|
||||
typedef struct _MonitorTestCaseLogicalMonitor
|
||||
{
|
||||
MetaRectangle layout;
|
||||
MtkRectangle layout;
|
||||
float scale;
|
||||
int monitors[MAX_N_MONITORS];
|
||||
int n_monitors;
|
||||
|
@ -221,7 +221,7 @@ assert_software_rendered (ClutterStageView *stage_view)
|
||||
|
||||
static void
|
||||
capture_view_into (ClutterStageView *view,
|
||||
MetaRectangle *rect,
|
||||
MtkRectangle *rect,
|
||||
uint8_t *buffer,
|
||||
int stride)
|
||||
{
|
||||
@ -277,7 +277,7 @@ on_after_paint (MetaStage *stage,
|
||||
gpointer user_data)
|
||||
{
|
||||
CaptureViewData *data = user_data;
|
||||
MetaRectangle rect;
|
||||
MtkRectangle rect;
|
||||
float view_scale;
|
||||
int texture_width, texture_height;
|
||||
cairo_surface_t *image;
|
||||
|
@ -92,7 +92,7 @@ typedef struct _DisplayTilePreview
|
||||
{
|
||||
ClutterActor *actor;
|
||||
|
||||
MetaRectangle tile_rect;
|
||||
MtkRectangle tile_rect;
|
||||
} DisplayTilePreview;
|
||||
|
||||
G_DEFINE_TYPE (MetaTestShell, meta_test_shell, META_TYPE_PLUGIN)
|
||||
@ -262,7 +262,7 @@ on_monitors_changed (MetaMonitorManager *monitor_manager,
|
||||
{
|
||||
MetaBackgroundContent *background_content;
|
||||
ClutterContent *content;
|
||||
MetaRectangle rect;
|
||||
MtkRectangle rect;
|
||||
ClutterActor *background_actor;
|
||||
MetaBackground *background;
|
||||
uint8_t red;
|
||||
@ -720,7 +720,7 @@ get_display_tile_preview (MetaDisplay *display)
|
||||
static void
|
||||
meta_test_shell_show_tile_preview (MetaPlugin *plugin,
|
||||
MetaWindow *window,
|
||||
MetaRectangle *tile_rect,
|
||||
MtkRectangle *tile_rect,
|
||||
int tile_monitor_number)
|
||||
{
|
||||
MetaDisplay *display = meta_plugin_get_display (plugin);
|
||||
|
@ -53,7 +53,7 @@ typedef struct _MonitorStoreTestCaseMonitor
|
||||
|
||||
typedef struct _MonitorStoreTestCaseLogicalMonitor
|
||||
{
|
||||
MetaRectangle layout;
|
||||
MtkRectangle layout;
|
||||
float scale;
|
||||
MetaMonitorTransform transform;
|
||||
gboolean is_primary;
|
||||
|
@ -7968,7 +7968,7 @@ meta_test_monitor_custom_lid_switch_config (void)
|
||||
test_case.expect.crtcs[1].x = 1024;
|
||||
test_case.expect.crtcs[1].transform = META_MONITOR_TRANSFORM_270;
|
||||
test_case.expect.logical_monitors[0].layout =
|
||||
(MetaRectangle) { .width = 1024, .height = 768 };
|
||||
(MtkRectangle) { .width = 1024, .height = 768 };
|
||||
test_case.expect.logical_monitors[0].transform = META_MONITOR_TRANSFORM_NORMAL;
|
||||
test_case.expect.logical_monitors[1].transform = META_MONITOR_TRANSFORM_270;
|
||||
test_case.expect.n_logical_monitors = 2;
|
||||
@ -7990,7 +7990,7 @@ meta_test_monitor_custom_lid_switch_config (void)
|
||||
test_case.expect.crtcs[1].x = 0;
|
||||
test_case.expect.monitors[0].current_mode = -1;
|
||||
test_case.expect.logical_monitors[0].layout =
|
||||
(MetaRectangle) { .width = 768, .height = 1024 };
|
||||
(MtkRectangle) { .width = 768, .height = 1024 };
|
||||
test_case.expect.logical_monitors[0].monitors[0] = 1;
|
||||
test_case.expect.logical_monitors[0].transform = META_MONITOR_TRANSFORM_90;
|
||||
test_case.expect.n_logical_monitors = 1;
|
||||
@ -8015,7 +8015,7 @@ meta_test_monitor_custom_lid_switch_config (void)
|
||||
test_case.expect.crtcs[1].x = 1024;
|
||||
test_case.expect.monitors[0].current_mode = 0;
|
||||
test_case.expect.logical_monitors[0].layout =
|
||||
(MetaRectangle) { .width = 1024, .height = 768 };
|
||||
(MtkRectangle) { .width = 1024, .height = 768 };
|
||||
test_case.expect.logical_monitors[0].monitors[0] = 0;
|
||||
test_case.expect.logical_monitors[0].transform = META_MONITOR_TRANSFORM_NORMAL;
|
||||
test_case.expect.logical_monitors[1].transform = META_MONITOR_TRANSFORM_270;
|
||||
|
@ -264,7 +264,7 @@ meta_test_kms_device_mode_set (void)
|
||||
g_autoptr (MetaDrmBuffer) primary_buffer = NULL;
|
||||
MetaKmsCrtcState crtc_state;
|
||||
MetaKmsConnectorState connector_state;
|
||||
MetaRectangle mode_rect;
|
||||
MtkRectangle mode_rect;
|
||||
MetaKmsFeedback *feedback;
|
||||
|
||||
device = meta_get_test_kms_device (test_context);
|
||||
|
@ -64,7 +64,7 @@ meta_test_headless_monitor_getters (void)
|
||||
display = meta_context_get_display (test_context);
|
||||
|
||||
index = meta_display_get_monitor_index_for_rect (display,
|
||||
&(MetaRectangle) { 0 });
|
||||
&(MtkRectangle) { 0 });
|
||||
g_assert_cmpint (index, ==, -1);
|
||||
}
|
||||
|
||||
@ -78,7 +78,7 @@ meta_test_headless_monitor_connect (void)
|
||||
g_autolist (GObject) udev_devices = NULL;
|
||||
GList *logical_monitors;
|
||||
MetaLogicalMonitor *logical_monitor;
|
||||
MetaRectangle monitor_layout;
|
||||
MtkRectangle monitor_layout;
|
||||
ClutterActor *stage;
|
||||
g_autoptr (GError) error = NULL;
|
||||
|
||||
|
@ -245,7 +245,7 @@ meta_test_switch_config (void)
|
||||
g_autoptr (ClutterVirtualInputDevice) virtual_keyboard = NULL;
|
||||
g_autoptr (MetaVirtualMonitor) virtual_monitor = NULL;
|
||||
GList *logical_monitors;
|
||||
MetaRectangle logical_monitor_layout;
|
||||
MtkRectangle logical_monitor_layout;
|
||||
gulong after_paint_handler_id;
|
||||
gulong presented_handler_id;
|
||||
gboolean monitors_changed;
|
||||
|
@ -229,8 +229,8 @@ meta_test_kms_render_client_scanout (void)
|
||||
gulong paint_view_handler_id;
|
||||
gulong presented_handler_id;
|
||||
MetaWindow *window;
|
||||
MetaRectangle view_rect;
|
||||
MetaRectangle buffer_rect;
|
||||
MtkRectangle view_rect;
|
||||
MtkRectangle buffer_rect;
|
||||
|
||||
test_driver = meta_wayland_test_driver_new (wayland_compositor);
|
||||
meta_wayland_test_driver_set_property (test_driver,
|
||||
|
@ -39,7 +39,7 @@ wait_for_paint (gpointer user_data)
|
||||
GList *monitors;
|
||||
GList *logical_monitors;
|
||||
MetaLogicalMonitor *logical_monitor;
|
||||
MetaRectangle layout;
|
||||
MtkRectangle layout;
|
||||
|
||||
loop = g_main_loop_new (NULL, FALSE);
|
||||
g_signal_connect_swapped (stage, "presented",
|
||||
|
@ -350,7 +350,7 @@ test_case_assert_size (TestCase *test,
|
||||
int expected_height,
|
||||
GError **error)
|
||||
{
|
||||
MetaRectangle frame_rect;
|
||||
MtkRectangle frame_rect;
|
||||
|
||||
meta_window_get_frame_rect (window, &frame_rect);
|
||||
|
||||
@ -449,7 +449,7 @@ parse_window_size (MetaWindow *window,
|
||||
const char *size_str)
|
||||
{
|
||||
MetaLogicalMonitor *logical_monitor;
|
||||
MetaRectangle logical_monitor_layout;
|
||||
MtkRectangle logical_monitor_layout;
|
||||
int value;
|
||||
|
||||
logical_monitor = meta_window_find_monitor_from_frame_rect (window);
|
||||
@ -889,7 +889,7 @@ test_case_do (TestCase *test,
|
||||
MetaDisplay *display = meta_context_get_display (test->context);
|
||||
MetaWorkspaceManager *workspace_manager =
|
||||
meta_display_get_workspace_manager (display);
|
||||
MetaRectangle rect = { x, y, width, height };
|
||||
MtkRectangle rect = { x, y, width, height };
|
||||
MetaStrut strut = { rect, side };
|
||||
GSList *struts = g_slist_append (NULL, &strut);
|
||||
GList *workspaces =
|
||||
@ -999,7 +999,7 @@ test_case_do (TestCase *test,
|
||||
if (!window)
|
||||
return FALSE;
|
||||
|
||||
MetaRectangle frame_rect;
|
||||
MtkRectangle frame_rect;
|
||||
meta_window_get_frame_rect (window, &frame_rect);
|
||||
int x = atoi (argv[2]);
|
||||
int y = atoi (argv[3]);
|
||||
|
@ -202,8 +202,8 @@ meta_test_util_later_schedule_from_later (void)
|
||||
static void
|
||||
meta_test_adjacent_to (void)
|
||||
{
|
||||
MetaRectangle base = { .x = 10, .y = 10, .width = 10, .height = 10 };
|
||||
MetaRectangle adjacent[] = {
|
||||
MtkRectangle base = { .x = 10, .y = 10, .width = 10, .height = 10 };
|
||||
MtkRectangle adjacent[] = {
|
||||
{ .x = 20, .y = 10, .width = 10, .height = 10 },
|
||||
{ .x = 0, .y = 10, .width = 10, .height = 10 },
|
||||
{ .x = 0, .y = 1, .width = 10, .height = 10 },
|
||||
@ -211,7 +211,7 @@ meta_test_adjacent_to (void)
|
||||
{ .x = 10, .y = 20, .width = 10, .height = 10 },
|
||||
{ .x = 10, .y = 0, .width = 10, .height = 10 },
|
||||
};
|
||||
MetaRectangle not_adjacent[] = {
|
||||
MtkRectangle not_adjacent[] = {
|
||||
{ .x = 0, .y = 0, .width = 10, .height = 10 },
|
||||
{ .x = 20, .y = 20, .width = 10, .height = 10 },
|
||||
{ .x = 21, .y = 10, .width = 10, .height = 10 },
|
||||
|
@ -65,7 +65,7 @@ fractional_scale (void)
|
||||
MetaMonitorManager *monitor_manager =
|
||||
meta_backend_get_monitor_manager (backend);
|
||||
MetaLogicalMonitor *logical_monitor;
|
||||
MetaRectangle layout;
|
||||
MtkRectangle layout;
|
||||
|
||||
wait_for_sync_point (0);
|
||||
assert_wayland_surface_size (test_window, 1920, 1080);
|
||||
|
@ -105,7 +105,7 @@ wait_for_window_added (MetaWindow *window)
|
||||
static void
|
||||
toplevel_fullscreen (void)
|
||||
{
|
||||
MetaRectangle rect;
|
||||
MtkRectangle rect;
|
||||
|
||||
wait_for_first_frame (test_window);
|
||||
|
||||
@ -121,7 +121,7 @@ static void
|
||||
toplevel_fullscreen_ref_test (void)
|
||||
{
|
||||
MetaWindowWayland *wl_window = META_WINDOW_WAYLAND (test_window);
|
||||
MetaRectangle rect;
|
||||
MtkRectangle rect;
|
||||
|
||||
wait_for_window_added (test_window);
|
||||
assert_wayland_surface_size (test_window, 10, 10);
|
||||
|
@ -148,7 +148,7 @@ on_effects_completed_idle (gpointer user_data)
|
||||
MetaBackend *backend = meta_context_get_backend (test_context);
|
||||
ClutterActor *stage = meta_backend_get_stage (backend);
|
||||
MetaWindow *window = meta_window_actor_get_meta_window (actor);
|
||||
MetaRectangle buffer_rect;
|
||||
MtkRectangle buffer_rect;
|
||||
|
||||
/* Move the window to a known position and perform a mouse click, allowing a
|
||||
* popup to be mapped. */
|
||||
@ -244,7 +244,7 @@ on_unmap_sync_point (MetaWaylandTestDriver *test_driver,
|
||||
ClutterActor *actor = CLUTTER_ACTOR (meta_wayland_surface_get_actor (surface));
|
||||
MetaWindowActor *window_actor = meta_window_actor_from_actor (actor);
|
||||
MetaWindow *window = meta_window_actor_get_meta_window (window_actor);
|
||||
MetaRectangle buffer_rect;
|
||||
MtkRectangle buffer_rect;
|
||||
|
||||
/* Click inside the window to allow mapping a popup. */
|
||||
|
||||
@ -424,7 +424,7 @@ wait_until_after_paint (void)
|
||||
}
|
||||
|
||||
static void
|
||||
set_struts (MetaRectangle rect,
|
||||
set_struts (MtkRectangle rect,
|
||||
MetaSide side)
|
||||
{
|
||||
MetaDisplay *display = meta_context_get_display (test_context);
|
||||
@ -465,7 +465,7 @@ clear_struts (void)
|
||||
}
|
||||
}
|
||||
|
||||
static MetaRectangle
|
||||
static MtkRectangle
|
||||
get_primary_logical_monitor_layout (void)
|
||||
{
|
||||
MetaBackend *backend = meta_context_get_backend (test_context);
|
||||
@ -483,8 +483,8 @@ toplevel_bounds_struts (void)
|
||||
{
|
||||
MetaWaylandTestClient *wayland_test_client;
|
||||
MetaWindow *window;
|
||||
MetaRectangle logical_monitor_layout;
|
||||
MetaRectangle work_area;
|
||||
MtkRectangle logical_monitor_layout;
|
||||
MtkRectangle work_area;
|
||||
|
||||
/*
|
||||
* This test case makes sure that setting and changing struts result in the
|
||||
@ -492,7 +492,7 @@ toplevel_bounds_struts (void)
|
||||
*/
|
||||
|
||||
logical_monitor_layout = get_primary_logical_monitor_layout ();
|
||||
set_struts ((MetaRectangle) {
|
||||
set_struts ((MtkRectangle) {
|
||||
.x = 0,
|
||||
.y = 0,
|
||||
.width = logical_monitor_layout.width,
|
||||
@ -566,8 +566,8 @@ toplevel_bounds_monitors (void)
|
||||
ClutterSeat *seat;
|
||||
g_autoptr (MetaVirtualMonitor) second_virtual_monitor = NULL;
|
||||
MetaWaylandTestClient *wayland_test_client;
|
||||
MetaRectangle logical_monitor_layout;
|
||||
MetaRectangle work_area;
|
||||
MtkRectangle logical_monitor_layout;
|
||||
MtkRectangle work_area;
|
||||
MetaWindow *window;
|
||||
|
||||
/*
|
||||
@ -584,7 +584,7 @@ toplevel_bounds_monitors (void)
|
||||
300, 200, 60.0);
|
||||
|
||||
logical_monitor_layout = get_primary_logical_monitor_layout ();
|
||||
set_struts ((MetaRectangle) {
|
||||
set_struts ((MtkRectangle) {
|
||||
.x = 0,
|
||||
.y = 0,
|
||||
.width = logical_monitor_layout.width,
|
||||
|
Reference in New Issue
Block a user