aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIsaac Freund <ifreund@ifreund.xyz>2021-01-07 14:45:55 +0100
committerSimon Ser <contact@emersion.fr>2021-01-12 11:25:55 +0100
commitf574ca934c80c747c36b8a97c8087a2c3c06d239 (patch)
tree3b05f7e3f2c7bd8523c752cf6d01c7f7eb0d8ec6
parent672e8e99b70736a12f6d8fcad423f1243d191af7 (diff)
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.
-rw-r--r--include/wlr/types/wlr_xdg_shell.h8
-rw-r--r--types/xdg_shell/wlr_xdg_surface.c25
2 files changed, 0 insertions, 33 deletions
diff --git a/include/wlr/types/wlr_xdg_shell.h b/include/wlr/types/wlr_xdg_shell.h
index 102b26cf..ec715bf4 100644
--- a/include/wlr/types/wlr_xdg_shell.h
+++ b/include/wlr/types/wlr_xdg_shell.h
@@ -415,12 +415,4 @@ void wlr_xdg_surface_for_each_popup_surface(struct wlr_xdg_surface *surface,
*/
uint32_t wlr_xdg_surface_schedule_configure(struct wlr_xdg_surface *surface);
-/**
- * Call `iterator` on each popup in the xdg-surface tree, with the popup'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(struct wlr_xdg_surface *surface,
- wlr_surface_iterator_func_t iterator, void *user_data);
-
#endif
diff --git a/types/xdg_shell/wlr_xdg_surface.c b/types/xdg_shell/wlr_xdg_surface.c
index fa9d99eb..edf562ab 100644
--- a/types/xdg_shell/wlr_xdg_surface.c
+++ b/types/xdg_shell/wlr_xdg_surface.c
@@ -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);