fullscreen-shell: refactor configure_presented_surface

Break this into internal and external parts so we don't have to pass
nonsense coordinates from fs_output_create()

Signed-off-by: Derek Foreman <derek.foreman@collabora.com>
This commit is contained in:
Derek Foreman 2022-10-26 11:46:53 -05:00 committed by Pekka Paalanen
parent de306e4601
commit 166ef1ad66

View file

@ -302,8 +302,7 @@ pending_surface_destroyed(struct wl_listener *listener, void *data)
}
static void
configure_presented_surface(struct weston_surface *surface, int32_t sx,
int32_t sy);
configure_presented_surface_internal(struct weston_surface *surface);
static struct fs_output *
fs_output_create(struct fullscreen_shell *shell, struct weston_output *output)
@ -337,7 +336,7 @@ fs_output_create(struct fullscreen_shell *shell, struct weston_output *output)
struct fs_client_surface, link);
fs_output_set_surface(fsout, surf->surface, surf->method, 0, 0);
configure_presented_surface(surf->surface, 0, 0);
configure_presented_surface_internal(surf->surface);
}
return fsout;
@ -580,6 +579,12 @@ fs_output_configure(struct fs_output *fsout,
static void
configure_presented_surface(struct weston_surface *surface, int32_t sx,
int32_t sy)
{
configure_presented_surface_internal(surface);
}
static void
configure_presented_surface_internal(struct weston_surface *surface)
{
struct fullscreen_shell *shell = surface->committed_private;
struct fs_output *fsout;