desktop-shell: Use consistent surface-has-content check for lock

Rather than checking if the surface has width 0, use our helper to see
if the surface has an attached buffer.

Signed-off-by: Daniel Stone <daniels@collabora.com>
This commit is contained in:
Daniel Stone 2023-07-12 19:34:00 +01:00 committed by Marius Vlad
parent 3e156720a9
commit 7205e88e60

View File

@ -2977,7 +2977,7 @@ lock_surface_committed(struct weston_surface *surface,
view = container_of(surface->views.next, struct weston_view, surface_link);
if (surface->width == 0)
if (!weston_surface_has_content(surface))
return;
if (weston_surface_is_mapped(surface))