From fe0750fec107f692be4f47659b446ed3d8d8f3b6 Mon Sep 17 00:00:00 2001 From: emersion Date: Fri, 27 Jul 2018 19:19:30 +0100 Subject: [PATCH] Remove output_surface_for_each_surface from header --- include/sway/output.h | 4 ---- sway/desktop/output.c | 14 +++++++------- 2 files changed, 7 insertions(+), 11 deletions(-) diff --git a/include/sway/output.h b/include/sway/output.h index 70f631a0..6283db68 100644 --- a/include/sway/output.h +++ b/include/sway/output.h @@ -67,10 +67,6 @@ struct sway_container *output_get_active_workspace(struct sway_output *output); void output_render(struct sway_output *output, struct timespec *when, pixman_region32_t *damage); -void output_surface_for_each_surface2(struct sway_output *output, - struct wlr_surface *surface, double ox, double oy, float rotation, - sway_surface_iterator_func_t iterator, void *user_data); - void output_view_for_each_surface(struct sway_output *output, struct sway_view *view, sway_surface_iterator_func_t iterator, void *user_data); diff --git a/sway/desktop/output.c b/sway/desktop/output.c index e1d85b10..8272b35b 100644 --- a/sway/desktop/output.c +++ b/sway/desktop/output.c @@ -119,8 +119,8 @@ void output_surface_for_each_surface_iterator(struct wlr_surface *surface, data->user_data); } -void output_surface_for_each_surface(struct sway_output *output, - struct wlr_surface *surface, double ox, double oy, float rotation, +static void output_surface_for_each_surface(struct sway_output *output, + struct wlr_surface *surface, double ox, double oy, sway_surface_iterator_func_t iterator, void *user_data) { struct surface_iterator_data data = { .user_iterator = iterator, @@ -130,7 +130,7 @@ void output_surface_for_each_surface(struct sway_output *output, .oy = oy, .width = surface->current.width, .height = surface->current.height, - .rotation = rotation, + .rotation = 0, }; wlr_surface_for_each_surface(surface, @@ -163,7 +163,7 @@ void output_layer_for_each_surface(struct sway_output *output, struct wlr_layer_surface *wlr_layer_surface = layer_surface->layer_surface; output_surface_for_each_surface(output, wlr_layer_surface->surface, - layer_surface->geo.x, layer_surface->geo.y, 0, iterator, + layer_surface->geo.x, layer_surface->geo.y, iterator, user_data); } } @@ -179,7 +179,7 @@ void output_unmanaged_for_each_surface(struct sway_output *output, double ox = unmanaged_surface->lx - output->swayc->current.swayc_x; double oy = unmanaged_surface->ly - output->swayc->current.swayc_y; - output_surface_for_each_surface(output, xsurface->surface, ox, oy, 0, + output_surface_for_each_surface(output, xsurface->surface, ox, oy, iterator, user_data); } } @@ -195,7 +195,7 @@ void output_drag_icons_for_each_surface(struct sway_output *output, if (drag_icon->wlr_drag_icon->mapped) { output_surface_for_each_surface(output, - drag_icon->wlr_drag_icon->surface, ox, oy, 0, + drag_icon->wlr_drag_icon->surface, ox, oy, iterator, user_data); } } @@ -430,7 +430,7 @@ static void damage_surface_iterator(struct sway_output *output, void output_damage_surface(struct sway_output *output, double ox, double oy, struct wlr_surface *surface, bool whole) { - output_surface_for_each_surface(output, surface, ox, oy, 0, + output_surface_for_each_surface(output, surface, ox, oy, damage_surface_iterator, &whole); }