From e61d15dd763c3f8d81d5b9572ec497f1f6928791 Mon Sep 17 00:00:00 2001 From: Daniel Stone Date: Wed, 28 Jun 2023 17:21:17 +0100 Subject: [PATCH] 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 --- tests/weston-test.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/weston-test.c b/tests/weston-test.c index af62676e..7744ad85 100644 --- a/tests/weston-test.c +++ b/tests/weston-test.c @@ -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