tests: Move surface mapping earlier in surface-shell

The surface needs to mapped before a view can be mapped. Fix this.

Signed-off-by: Daniel Stone <daniels@collabora.com>
This commit is contained in:
Daniel Stone 2023-06-28 17:21:17 +01:00
parent 4c63a12857
commit e61d15dd76

View File

@ -259,17 +259,17 @@ test_surface_committed(struct weston_surface *surface,
struct weston_test *test = test_surface->test;
struct weston_coord_global pos;
weston_surface_map(test_surface->surface);
if (wl_list_empty(&test_surface->view->layer_link.link))
weston_layer_entry_insert(&test->layer.view_list,
&test_surface->view->layer_link);
test_surface->view->is_mapped = true;
pos.c = weston_coord(test_surface->x, test_surface->y);
weston_view_set_position(test_surface->view, pos);
weston_view_update_transform(test_surface->view);
weston_surface_map(test_surface->surface);
test_surface->view->is_mapped = true;
}
static int