From 6219d7b81932460b5c6ee2b431cfd09a806cd860 Mon Sep 17 00:00:00 2001 From: Isaac Freund Date: Wed, 15 May 2024 15:28:28 +0200 Subject: [PATCH] wlr_surface: update get_root_surface() docs Since destroying a wlr_surface now makes all subsurfaces inert, this function can no longer fail and return NULL. Document this. --- include/wlr/types/wlr_compositor.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/include/wlr/types/wlr_compositor.h b/include/wlr/types/wlr_compositor.h index 19db8032..fa9e354b 100644 --- a/include/wlr/types/wlr_compositor.h +++ b/include/wlr/types/wlr_compositor.h @@ -329,8 +329,9 @@ bool wlr_surface_state_has_buffer(const struct wlr_surface_state *state); struct wlr_texture *wlr_surface_get_texture(struct wlr_surface *surface); /** - * Get the root of the subsurface tree for this surface. Can return NULL if - * a surface in the tree has been destroyed. + * Get the root of the subsurface tree for this surface. + * May return the same surface passed if that surface is the root. + * Never returns NULL. */ struct wlr_surface *wlr_surface_get_root_surface(struct wlr_surface *surface);