xdg_shell.c:230:2: warning: implicit declaration of function 'wlr_xdg_surface_for_each_popup' is invalid in C99 [-Wimplicit-function-declaration]
        wlr_xdg_surface_for_each_popup(xdg_shell_view->xdg_surface, iterator, data);
        ^
ld: error: undefined symbol: wlr_xdg_surface_for_each_popup
>>> referenced by xdg_shell.c:230 (../xdg_shell.c:230)
>>>               cage.p/xdg_shell.c.o:(for_each_popup)

Based on 5438cc158a
This commit is contained in:
Jan Beich 2021-01-14 00:54:00 +00:00 committed by Jente Hidskes
parent 90da4ee4dc
commit 82bad3f0fc
7 changed files with 15 additions and 25 deletions

View file

@ -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

View file

@ -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);

View file

@ -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

6
view.c
View file

@ -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

4
view.h
View file

@ -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);

View file

@ -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,
};

View file

@ -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,
};