From d3d1437bc452fd2aa6c94feb9759928e8d07514d Mon Sep 17 00:00:00 2001 From: Drew DeVault Date: Thu, 10 Jan 2019 21:53:32 -0500 Subject: Add wlr_wl_output_set_title --- backend/wayland/output.c | 5 +++++ include/wlr/backend/wayland.h | 10 +++++++--- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/backend/wayland/output.c b/backend/wayland/output.c index f1eb73fd..a515374b 100644 --- a/backend/wayland/output.c +++ b/backend/wayland/output.c @@ -365,3 +365,8 @@ error: wlr_output_destroy(&output->wlr_output); return NULL; } + +void wlr_wl_output_set_title(struct wlr_output *output, const char *title) { + struct wlr_wl_output *wl_output = get_wl_output_from_output(output); + xdg_toplevel_set_title(wl_output->xdg_toplevel, title); +} diff --git a/include/wlr/backend/wayland.h b/include/wlr/backend/wayland.h index 119ea247..9a47d1ce 100644 --- a/include/wlr/backend/wayland.h +++ b/include/wlr/backend/wayland.h @@ -1,6 +1,5 @@ #ifndef WLR_BACKEND_WAYLAND_H #define WLR_BACKEND_WAYLAND_H - #include #include #include @@ -16,8 +15,8 @@ * to NULL for the default behaviour (WAYLAND_DISPLAY env variable or wayland-0 * default) */ -struct wlr_backend *wlr_wl_backend_create(struct wl_display *display, const char *remote, - wlr_renderer_create_func_t create_renderer_func); +struct wlr_backend *wlr_wl_backend_create(struct wl_display *display, + const char *remote, wlr_renderer_create_func_t create_renderer_func); /** * Adds a new output to this backend. You may remove outputs by destroying them. @@ -42,4 +41,9 @@ bool wlr_input_device_is_wl(struct wlr_input_device *device); */ bool wlr_output_is_wl(struct wlr_output *output); +/** + * Sets the title of a wlr_output which is a Wayland window. + */ +void wlr_wl_output_set_title(struct wlr_output *output, const char *title); + #endif -- cgit v1.2.3