diff options
Diffstat (limited to 'libweston/compositor.c')
-rw-r--r-- | libweston/compositor.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/libweston/compositor.c b/libweston/compositor.c index c3a94d35..f5695f87 100644 --- a/libweston/compositor.c +++ b/libweston/compositor.c @@ -5249,6 +5249,24 @@ weston_output_release(struct weston_output *output) free(output->name); } +/** When you need a head... + * + * This function is a hack, used until all code has been converted to become + * multi-head aware. + * + * \param output The weston_output whose head to get. + * \return The first head in the output's list. + */ +WL_EXPORT struct weston_head * +weston_output_get_first_head(struct weston_output *output) +{ + if (wl_list_empty(&output->head_list)) + return NULL; + + return container_of(output->head_list.next, + struct weston_head, output_link); +} + static void destroy_viewport(struct wl_resource *resource) { |