xdg shell: remove wlr_xdg_surface_for_each_popup()

This function is inferior to wlr_xdg_surface_for_each_popup_surface()
for rendering as it does not iterate over subsurfaces. Furthermore,
no compositor is known to use this to iterate popups for any purpose
other than rendering. Therefore remove the function, which may of course
be reintroduced at a later date if a use-case is found.
This commit is contained in:
Isaac Freund 2021-01-07 14:45:55 +01:00 committed by Simon Ser
parent 672e8e99b7
commit f574ca934c
2 changed files with 0 additions and 33 deletions

View file

@ -626,26 +626,6 @@ static void xdg_surface_iterator(struct wlr_surface *surface,
iter_data->user_data);
}
static void xdg_surface_for_each_popup(struct wlr_xdg_surface *surface,
int x, int y, wlr_surface_iterator_func_t iterator, void *user_data) {
struct wlr_xdg_popup *popup_state;
wl_list_for_each(popup_state, &surface->popups, link) {
struct wlr_xdg_surface *popup = popup_state->base;
if (!popup->configured) {
continue;
}
double popup_sx, popup_sy;
xdg_popup_get_position(popup_state, &popup_sx, &popup_sy);
iterator(popup->surface, x + popup_sx, y + popup_sy, user_data);
xdg_surface_for_each_popup(popup,
x + popup_sx,
y + popup_sy,
iterator, user_data);
}
}
static void xdg_surface_for_each_popup_surface(struct wlr_xdg_surface *surface,
int x, int y, wlr_surface_iterator_func_t iterator, void *user_data) {
struct wlr_xdg_popup *popup_state;
@ -684,11 +664,6 @@ void wlr_xdg_surface_for_each_popup_surface(struct wlr_xdg_surface *surface,
xdg_surface_for_each_popup_surface(surface, 0, 0, iterator, user_data);
}
void wlr_xdg_surface_for_each_popup(struct wlr_xdg_surface *surface,
wlr_surface_iterator_func_t iterator, void *user_data) {
xdg_surface_for_each_popup(surface, 0, 0, iterator, user_data);
}
void wlr_xdg_surface_get_geometry(struct wlr_xdg_surface *surface,
struct wlr_box *box) {
wlr_surface_get_extends(surface->surface, box);