From c5c5ab97249861ae1d17cad382e001646f27486d Mon Sep 17 00:00:00 2001 From: Isaac Freund Date: Thu, 7 Jan 2021 14:41:24 +0100 Subject: xdg shell: add wlr_xdg_surface_for_each_popup_surface() When rendering, it is necessary to iterate the subsurfaces as well, so add a function that makes this easy. --- include/wlr/types/wlr_xdg_shell.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'include/wlr') diff --git a/include/wlr/types/wlr_xdg_shell.h b/include/wlr/types/wlr_xdg_shell.h index 04addfe1..a519ed8b 100644 --- a/include/wlr/types/wlr_xdg_shell.h +++ b/include/wlr/types/wlr_xdg_shell.h @@ -392,6 +392,14 @@ void wlr_xdg_surface_get_geometry(struct wlr_xdg_surface *surface, void wlr_xdg_surface_for_each_surface(struct wlr_xdg_surface *surface, wlr_surface_iterator_func_t iterator, void *user_data); +/** + * Call `iterator` on each popup's surface and popup's subsurface in the + * xdg-surface tree, with the surfaces's position relative to the root + * xdg-surface. The function is called from root to leaves (in rendering order). + */ +void wlr_xdg_surface_for_each_popup_surface(struct wlr_xdg_surface *surface, + wlr_surface_iterator_func_t iterator, void *user_data); + /** * Schedule a surface configuration. This should only be called by protocols * extending the shell. -- cgit v1.2.3