tests: Don't remap surfaces with NULL buffer

On attaching a NULL wl_buffer, weston_surface_attach() will unmap the
surface. Don't immediately remap it within committed() if we don't have
a buffer.

Signed-off-by: Daniel Stone <daniels@collabora.com>
This commit is contained in:
Daniel Stone 2023-06-28 17:24:30 +01:00
parent 5b14a094e7
commit caac97be6a
1 changed files with 3 additions and 0 deletions

View File

@ -259,6 +259,9 @@ test_surface_committed(struct weston_surface *surface,
struct weston_test *test = test_surface->test;
struct weston_coord_global pos;
if (!weston_surface_has_content(surface))
return;
weston_surface_map(test_surface->surface);
pos.c = weston_coord(test_surface->x, test_surface->y);