Remove output_view_for_each_surface

This commit is contained in:
Ryan Dwyer 2018-07-01 13:14:11 +10:00
parent d2d530bd09
commit 8afe308be8

View file

@ -122,20 +122,6 @@ static void surface_for_each_surface(struct wlr_surface *surface,
wlr_surface_for_each_surface(surface, iterator, user_data); wlr_surface_for_each_surface(surface, iterator, user_data);
} }
static void output_view_for_each_surface(struct sway_view *view,
struct root_geometry *geo, wlr_surface_iterator_func_t iterator,
void *user_data) {
geo->x =
view->swayc->current.view_x - context.output->swayc->current.swayc_x;
geo->y =
view->swayc->current.view_y - context.output->swayc->current.swayc_y;
geo->width = view->swayc->current.view_width;
geo->height = view->swayc->current.view_height;
geo->rotation = 0; // TODO
view_for_each_surface(view, iterator, user_data);
}
static void layer_for_each_surface(struct wl_list *layer_surfaces, static void layer_for_each_surface(struct wl_list *layer_surfaces,
struct root_geometry *geo, wlr_surface_iterator_func_t iterator, struct root_geometry *geo, wlr_surface_iterator_func_t iterator,
void *user_data) { void *user_data) {
@ -331,8 +317,15 @@ static void render_view_surfaces(struct sway_view *view, float alpha) {
.view = view, .view = view,
.alpha = alpha, .alpha = alpha,
}; };
output_view_for_each_surface( data.root_geo.x =
view, &data.root_geo, render_surface_iterator, &data); view->swayc->current.view_x - context.output->swayc->current.swayc_x;
data.root_geo.y =
view->swayc->current.view_y - context.output->swayc->current.swayc_y;
data.root_geo.width = view->swayc->current.view_width;
data.root_geo.height = view->swayc->current.view_height;
data.root_geo.rotation = 0; // TODO
view_for_each_surface(view, render_surface_iterator, &data);
} }
static void render_saved_view(struct sway_view *view, float alpha) { static void render_saved_view(struct sway_view *view, float alpha) {