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 <daniels@collabora.com>
This commit is contained in:
Daniel Stone 2022-06-15 15:56:24 +01:00 committed by Marius Vlad
parent d211e3173c
commit 888d08d8a5

View file

@ -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);
}