diff --git a/include/labwc.h b/include/labwc.h index 2a924f67..6fb597db 100644 --- a/include/labwc.h +++ b/include/labwc.h @@ -161,7 +161,7 @@ enum deco_part { struct view_impl { void (*configure)(struct view *view, struct wlr_box geo); void (*close)(struct view *view); - void (*for_each_popup)(struct view *view, + void (*for_each_popup_surface)(struct view *view, wlr_surface_iterator_func_t iterator, void *data); void (*for_each_surface)(struct view *view, wlr_surface_iterator_func_t iterator, void *data); @@ -302,7 +302,7 @@ void view_unminimize(struct view *view); void view_maximize(struct view *view, bool maximize); void view_for_each_surface(struct view *view, wlr_surface_iterator_func_t iterator, void *user_data); -void view_for_each_popup(struct view *view, +void view_for_each_popup_surface(struct view *view, wlr_surface_iterator_func_t iterator, void *data); void desktop_focus_view(struct seat *seat, struct view *view); diff --git a/src/output.c b/src/output.c index 352981a5..1f75a66a 100644 --- a/src/output.c +++ b/src/output.c @@ -223,7 +223,7 @@ output_view_for_each_surface(struct output *output, struct view *view, } void -output_view_for_each_popup(struct output *output, struct view *view, +output_view_for_each_popup_surface(struct output *output, struct view *view, surface_iterator_func_t iterator, void *user_data) { struct surface_iterator_data data = { @@ -236,7 +236,7 @@ output_view_for_each_popup(struct output *output, struct view *view, wlr_output_layout_output_coords(output->server->output_layout, output->wlr_output, &data.ox, &data.oy); - view_for_each_popup(view, output_for_each_surface_iterator, &data); + view_for_each_popup_surface(view, output_for_each_surface_iterator, &data); } /* for sending frame done */ @@ -572,18 +572,6 @@ render_view_toplevels(struct view *view, struct output *output, render_surface_iterator, &data); } -static void -render_popup_iterator(struct output *output, struct wlr_surface *surface, - struct wlr_box *box, void *data) -{ - /* Render this popup's surface */ - render_surface_iterator(output, surface, box, data); - - /* Render this popup's child toplevels */ - output_surface_for_each_surface(output, surface, box->x, box->y, - render_surface_iterator, data); -} - static void render_view_popups(struct view *view, struct output *output, pixman_region32_t *damage) @@ -591,7 +579,7 @@ render_view_popups(struct view *view, struct output *output, struct render_data data = { .damage = damage, }; - output_view_for_each_popup(output, view, render_popup_iterator, &data); + output_view_for_each_popup_surface(output, view, render_surface_iterator, &data); } void diff --git a/src/view.c b/src/view.c index 26167414..698ff880 100644 --- a/src/view.c +++ b/src/view.c @@ -89,12 +89,12 @@ view_for_each_surface(struct view *view, wlr_surface_iterator_func_t iterator, } void -view_for_each_popup(struct view *view, wlr_surface_iterator_func_t iterator, +view_for_each_popup_surface(struct view *view, wlr_surface_iterator_func_t iterator, void *data) { - if (!view->impl->for_each_popup) { + if (!view->impl->for_each_popup_surface) { return; } - view->impl->for_each_popup(view, iterator, data); + view->impl->for_each_popup_surface(view, iterator, data); } diff --git a/src/xdg.c b/src/xdg.c index e35d5f21..cbb91c89 100644 --- a/src/xdg.c +++ b/src/xdg.c @@ -169,10 +169,10 @@ xdg_toplevel_view_close(struct view *view) } static void -xdg_toplevel_view_for_each_popup(struct view *view, +xdg_toplevel_view_for_each_popup_surface(struct view *view, wlr_surface_iterator_func_t iterator, void *data) { - wlr_xdg_surface_for_each_popup(view->xdg_surface, iterator, data); + wlr_xdg_surface_for_each_popup_surface(view->xdg_surface, iterator, data); } static void @@ -247,7 +247,7 @@ xdg_toplevel_view_unmap(struct view *view) static const struct view_impl xdg_toplevel_view_impl = { .configure = xdg_toplevel_view_configure, .close = xdg_toplevel_view_close, - .for_each_popup = xdg_toplevel_view_for_each_popup, + .for_each_popup_surface = xdg_toplevel_view_for_each_popup_surface, .for_each_surface = xdg_toplevel_view_for_each_surface, .map = xdg_toplevel_view_map, .move = xdg_toplevel_view_move,