From 7205e88e601c4606b5cde224f254bf890a0e2471 Mon Sep 17 00:00:00 2001 From: Daniel Stone Date: Wed, 12 Jul 2023 19:34:00 +0100 Subject: [PATCH] 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 --- desktop-shell/shell.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/desktop-shell/shell.c b/desktop-shell/shell.c index a1f105e0d..0180e321e 100644 --- a/desktop-shell/shell.c +++ b/desktop-shell/shell.c @@ -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))