From 8678633fc9772940a3b8b59f6caa3603a13cf5e3 Mon Sep 17 00:00:00 2001 From: Simon Ser Date: Wed, 7 Jun 2023 14:35:26 +0200 Subject: backend/wayland: add wlr_wl_output_create_from_surface() By using this function, a compositor can display a wlroots compositor in a sub-surface, for instance. --- include/wlr/backend/wayland.h | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'include/wlr/backend') diff --git a/include/wlr/backend/wayland.h b/include/wlr/backend/wayland.h index 45df69e1..a30bac25 100644 --- a/include/wlr/backend/wayland.h +++ b/include/wlr/backend/wayland.h @@ -24,13 +24,24 @@ struct wlr_backend *wlr_wl_backend_create(struct wl_display *display, struct wl_display *wlr_wl_backend_get_remote_display(struct wlr_backend *backend); /** - * Adds a new output to this backend. You may remove outputs by destroying them. + * Adds a new output to this backend. + * + * This creates a new xdg_toplevel in the parent Wayland compositor. + * + * You may remove outputs by destroying them. + * * Note that if called before initializing the backend, this will return NULL * and your outputs will be created during initialization (and given to you via * the new_output signal). */ struct wlr_output *wlr_wl_output_create(struct wlr_backend *backend); +/** + * Create a new output from an existing struct wl_surface. + */ +struct wlr_output *wlr_wl_output_create_from_surface(struct wlr_backend *backend, + struct wl_surface *surface); + /** * Check whether the provided backend is a Wayland backend. */ -- cgit v1.2.3