From cd80227b6045e98d0793c664bd703414073d4577 Mon Sep 17 00:00:00 2001 From: Erik Reider <35975961+ErikReider@users.noreply.github.com> Date: Fri, 6 Jan 2023 15:09:15 +0100 Subject: [PATCH] Small code cleanup --- sway/desktop/render.c | 22 +++++++--------------- 1 file changed, 7 insertions(+), 15 deletions(-) diff --git a/sway/desktop/render.c b/sway/desktop/render.c index 4bae1cb4..fdbfbb7a 100644 --- a/sway/desktop/render.c +++ b/sway/desktop/render.c @@ -472,7 +472,7 @@ static void render_saved_view(struct sway_view *view, struct sway_output *output } /** - * Render a view's surface, shadow, and left/bottom/right borders. + * Render a view's surface, and left/bottom/right borders. */ static void render_view(struct sway_output *output, pixman_region32_t *damage, struct sway_container *con, struct border_colors *colors, @@ -1127,16 +1127,12 @@ static void render_containers_tabbed(struct sway_output *output, if (current->shadow_enabled && config->shadow_blur_sigma > 0 && config->shadow_color[3] > 0.0) { - struct wlr_box box = { - current->current.x, - current->current.y, - current->current.width, - current->current.height - }; + struct sway_container_state *state = ¤t->current; + struct wlr_box box = { state->x, state->y, state->width, state->height }; scale_box(&box, output->wlr_output->scale); render_box_shadow(output, damage, &box, config->shadow_color, config->shadow_blur_sigma, current->corner_radius, - current->current.border_thickness); + state->border_thickness); } fx_renderer_end_stenciling(); @@ -1223,16 +1219,12 @@ static void render_containers_stacked(struct sway_output *output, if (current->shadow_enabled && config->shadow_blur_sigma > 0 && config->shadow_color[3] > 0.0) { - struct wlr_box box = { - current->current.x, - current->current.y, - current->current.width, - current->current.height - }; + struct sway_container_state *state = ¤t->current; + struct wlr_box box = { state->x, state->y, state->width, state->height }; scale_box(&box, output->wlr_output->scale); render_box_shadow(output, damage, &box, config->shadow_color, config->shadow_blur_sigma, current->corner_radius, - current->current.border_thickness); + state->border_thickness); } fx_renderer_end_stenciling();