diff --git a/output.c b/output.c index e162af9..4c4d77a 100644 --- a/output.c +++ b/output.c @@ -122,8 +122,8 @@ output_view_for_each_surface(struct cg_output *output, struct cg_view *view, cg_ } void -output_view_for_each_popup(struct cg_output *output, struct cg_view *view, cg_surface_iterator_func_t iterator, - void *user_data) +output_view_for_each_popup_surface(struct cg_output *output, struct cg_view *view, cg_surface_iterator_func_t iterator, + void *user_data) { struct surface_iterator_data data = { .user_iterator = iterator, @@ -134,7 +134,7 @@ output_view_for_each_popup(struct cg_output *output, struct cg_view *view, cg_su }; 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); } void diff --git a/output.h b/output.h index 687b45c..a573df9 100644 --- a/output.h +++ b/output.h @@ -28,8 +28,8 @@ typedef void (*cg_surface_iterator_func_t)(struct cg_output *output, struct wlr_ void handle_new_output(struct wl_listener *listener, void *data); void output_surface_for_each_surface(struct cg_output *output, struct wlr_surface *surface, double ox, double oy, cg_surface_iterator_func_t iterator, void *user_data); -void output_view_for_each_popup(struct cg_output *output, struct cg_view *view, cg_surface_iterator_func_t iterator, - void *user_data); +void output_view_for_each_popup_surface(struct cg_output *output, struct cg_view *view, + cg_surface_iterator_func_t iterator, void *user_data); void output_drag_icons_for_each_surface(struct cg_output *output, struct wl_list *drag_icons, cg_surface_iterator_func_t iterator, void *user_data); void output_damage_surface(struct cg_output *output, struct wlr_surface *surface, double lx, double ly, bool whole); diff --git a/render.c b/render.c index 1e3b614..166a088 100644 --- a/render.c +++ b/render.c @@ -119,23 +119,13 @@ render_view_toplevels(struct cg_view *view, struct cg_output *output, pixman_reg output_surface_for_each_surface(output, view->wlr_surface, ox, oy, render_surface_iterator, &data); } -static void -render_popup_iterator(struct cg_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 cg_view *view, struct cg_output *output, pixman_region32_t *damage) { 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/view.c b/view.c index 0b8d377..b9ba9c2 100644 --- a/view.c +++ b/view.c @@ -206,12 +206,12 @@ view_for_each_surface(struct cg_view *view, wlr_surface_iterator_func_t iterator } void -view_for_each_popup(struct cg_view *view, wlr_surface_iterator_func_t iterator, void *data) +view_for_each_popup_surface(struct cg_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); } void diff --git a/view.h b/view.h index 1b0e90f..cd16e42 100644 --- a/view.h +++ b/view.h @@ -45,7 +45,7 @@ struct cg_view_impl { void (*maximize)(struct cg_view *view, int output_width, int output_height); void (*destroy)(struct cg_view *view); void (*for_each_surface)(struct cg_view *view, wlr_surface_iterator_func_t iterator, void *data); - void (*for_each_popup)(struct cg_view *view, wlr_surface_iterator_func_t iterator, void *data); + void (*for_each_popup_surface)(struct cg_view *view, wlr_surface_iterator_func_t iterator, void *data); struct wlr_surface *(*wlr_surface_at)(struct cg_view *view, double sx, double sy, double *sub_x, double *sub_y); }; @@ -75,7 +75,7 @@ void view_damage_whole(struct cg_view *view); void view_activate(struct cg_view *view, bool activate); void view_position(struct cg_view *view); void view_for_each_surface(struct cg_view *view, wlr_surface_iterator_func_t iterator, void *data); -void view_for_each_popup(struct cg_view *view, wlr_surface_iterator_func_t iterator, void *data); +void view_for_each_popup_surface(struct cg_view *view, wlr_surface_iterator_func_t iterator, void *data); void view_unmap(struct cg_view *view); void view_map(struct cg_view *view, struct wlr_surface *surface); void view_destroy(struct cg_view *view); diff --git a/xdg_shell.c b/xdg_shell.c index 26fe860..2e42347 100644 --- a/xdg_shell.c +++ b/xdg_shell.c @@ -224,10 +224,10 @@ for_each_surface(struct cg_view *view, wlr_surface_iterator_func_t iterator, voi } static void -for_each_popup(struct cg_view *view, wlr_surface_iterator_func_t iterator, void *data) +for_each_popup_surface(struct cg_view *view, wlr_surface_iterator_func_t iterator, void *data) { struct cg_xdg_shell_view *xdg_shell_view = xdg_shell_view_from_view(view); - wlr_xdg_surface_for_each_popup(xdg_shell_view->xdg_surface, iterator, data); + wlr_xdg_surface_for_each_popup_surface(xdg_shell_view->xdg_surface, iterator, data); } static struct wlr_surface * @@ -305,7 +305,7 @@ static const struct cg_view_impl xdg_shell_view_impl = { .maximize = maximize, .destroy = destroy, .for_each_surface = for_each_surface, - .for_each_popup = for_each_popup, + .for_each_popup_surface = for_each_popup_surface, .wlr_surface_at = wlr_surface_at, }; diff --git a/xwayland.c b/xwayland.c index 53c9768..2aae0f9 100644 --- a/xwayland.c +++ b/xwayland.c @@ -181,7 +181,7 @@ static const struct cg_view_impl xwayland_view_impl = { .destroy = destroy, .for_each_surface = for_each_surface, /* XWayland doesn't have a separate popup iterator. */ - .for_each_popup = NULL, + .for_each_popup_surface = NULL, .wlr_surface_at = wlr_surface_at, };