From 888d08d8a533a0c8791b82d79e7f13819f66d3ba Mon Sep 17 00:00:00 2001 From: Daniel Stone Date: Wed, 15 Jun 2022 15:56:24 +0100 Subject: [PATCH] desktop-shell: Use weston_surface_has_content() Now we've got a wrapper which can tell us whether or not a surface has content, use it. 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 8e3ec134..87bcae3d 100644 --- a/desktop-shell/shell.c +++ b/desktop-shell/shell.c @@ -2124,7 +2124,7 @@ shell_configure_fullscreen(struct shell_surface *shsurf) surface_subsurfaces_boundingbox(surface, &surf_x, &surf_y, &surf_width, &surf_height); - if (surface->buffer_ref.buffer) + if (weston_surface_has_content(surface)) center_on_output(shsurf->view, shsurf->fullscreen_output); }