From 07111828c5a2a4cd12db348c4d1879c2f769a71c Mon Sep 17 00:00:00 2001 From: Isaac Freund Date: Fri, 8 Jan 2021 11:14:42 +0100 Subject: [PATCH] layer shell: rename popup iterator for consistency This iterates over the subsurfaces of popups as well, so rename it to match wlr_xdg_surface_for_each_popup_surface(). --- include/wlr/types/wlr_layer_shell_v1.h | 10 ++++++++-- types/wlr_layer_shell_v1.c | 4 ++-- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/include/wlr/types/wlr_layer_shell_v1.h b/include/wlr/types/wlr_layer_shell_v1.h index 007c612b..9c56f8af 100644 --- a/include/wlr/types/wlr_layer_shell_v1.h +++ b/include/wlr/types/wlr_layer_shell_v1.h @@ -138,8 +138,14 @@ struct wlr_layer_surface_v1 *wlr_layer_surface_v1_from_wlr_surface( void wlr_layer_surface_v1_for_each_surface(struct wlr_layer_surface_v1 *surface, wlr_surface_iterator_func_t iterator, void *user_data); -/* Calls the iterator function for each popup of this surface */ -void wlr_layer_surface_v1_for_each_popup(struct wlr_layer_surface_v1 *surface, +/** + * Call `iterator` on each popup's surface and popup's subsurface in the + * layer surface's tree, with the surfaces's position relative to the root + * layer surface. The function is called from root to leaves (in rendering + * order). + */ +void wlr_layer_surface_v1_for_each_popup_surface( + struct wlr_layer_surface_v1 *surface, wlr_surface_iterator_func_t iterator, void *user_data); /** diff --git a/types/wlr_layer_shell_v1.c b/types/wlr_layer_shell_v1.c index 16efd81d..f1fe6b97 100644 --- a/types/wlr_layer_shell_v1.c +++ b/types/wlr_layer_shell_v1.c @@ -533,10 +533,10 @@ static void layer_surface_iterator(struct wlr_surface *surface, void wlr_layer_surface_v1_for_each_surface(struct wlr_layer_surface_v1 *surface, wlr_surface_iterator_func_t iterator, void *user_data) { wlr_surface_for_each_surface(surface->surface, iterator, user_data); - wlr_layer_surface_v1_for_each_popup(surface, iterator, user_data); + wlr_layer_surface_v1_for_each_popup_surface(surface, iterator, user_data); } -void wlr_layer_surface_v1_for_each_popup(struct wlr_layer_surface_v1 *surface, +void wlr_layer_surface_v1_for_each_popup_surface(struct wlr_layer_surface_v1 *surface, wlr_surface_iterator_func_t iterator, void *user_data){ struct wlr_xdg_popup *popup_state; wl_list_for_each(popup_state, &surface->popups, link) {