Small code cleanup
This commit is contained in:
parent
4160b16ca7
commit
cd80227b60
1 changed files with 7 additions and 15 deletions
|
@ -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,
|
static void render_view(struct sway_output *output, pixman_region32_t *damage,
|
||||||
struct sway_container *con, struct border_colors *colors,
|
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
|
if (current->shadow_enabled
|
||||||
&& config->shadow_blur_sigma > 0
|
&& config->shadow_blur_sigma > 0
|
||||||
&& config->shadow_color[3] > 0.0) {
|
&& config->shadow_color[3] > 0.0) {
|
||||||
struct wlr_box box = {
|
struct sway_container_state *state = ¤t->current;
|
||||||
current->current.x,
|
struct wlr_box box = { state->x, state->y, state->width, state->height };
|
||||||
current->current.y,
|
|
||||||
current->current.width,
|
|
||||||
current->current.height
|
|
||||||
};
|
|
||||||
scale_box(&box, output->wlr_output->scale);
|
scale_box(&box, output->wlr_output->scale);
|
||||||
render_box_shadow(output, damage, &box, config->shadow_color,
|
render_box_shadow(output, damage, &box, config->shadow_color,
|
||||||
config->shadow_blur_sigma, current->corner_radius,
|
config->shadow_blur_sigma, current->corner_radius,
|
||||||
current->current.border_thickness);
|
state->border_thickness);
|
||||||
}
|
}
|
||||||
|
|
||||||
fx_renderer_end_stenciling();
|
fx_renderer_end_stenciling();
|
||||||
|
@ -1223,16 +1219,12 @@ static void render_containers_stacked(struct sway_output *output,
|
||||||
if (current->shadow_enabled
|
if (current->shadow_enabled
|
||||||
&& config->shadow_blur_sigma > 0
|
&& config->shadow_blur_sigma > 0
|
||||||
&& config->shadow_color[3] > 0.0) {
|
&& config->shadow_color[3] > 0.0) {
|
||||||
struct wlr_box box = {
|
struct sway_container_state *state = ¤t->current;
|
||||||
current->current.x,
|
struct wlr_box box = { state->x, state->y, state->width, state->height };
|
||||||
current->current.y,
|
|
||||||
current->current.width,
|
|
||||||
current->current.height
|
|
||||||
};
|
|
||||||
scale_box(&box, output->wlr_output->scale);
|
scale_box(&box, output->wlr_output->scale);
|
||||||
render_box_shadow(output, damage, &box, config->shadow_color,
|
render_box_shadow(output, damage, &box, config->shadow_color,
|
||||||
config->shadow_blur_sigma, current->corner_radius,
|
config->shadow_blur_sigma, current->corner_radius,
|
||||||
current->current.border_thickness);
|
state->border_thickness);
|
||||||
}
|
}
|
||||||
|
|
||||||
fx_renderer_end_stenciling();
|
fx_renderer_end_stenciling();
|
||||||
|
|
Loading…
Add table
Reference in a new issue