added corner radius scaling for layer shadows, fixed indentation
This commit is contained in:
parent
783ceb7937
commit
d4b2d7fccc
1 changed files with 5 additions and 18 deletions
|
@ -441,22 +441,8 @@ static void render_surface_iterator(struct sway_output *output,
|
||||||
struct decoration_data deco_data = data->deco_data;
|
struct decoration_data deco_data = data->deco_data;
|
||||||
deco_data.corner_radius *= wlr_output->scale;
|
deco_data.corner_radius *= wlr_output->scale;
|
||||||
|
|
||||||
bool is_subsurface = false;
|
bool is_subsurface = view ? view->surface != surface : false;
|
||||||
bool should_optimize_blur = false;
|
bool should_optimize_blur = view ? !container_is_floating(view->container) || config->blur_xray : false;
|
||||||
if (view) {
|
|
||||||
is_subsurface = view->surface != surface;
|
|
||||||
should_optimize_blur = !container_is_floating(view->container) || config->blur_xray;
|
|
||||||
}
|
|
||||||
/*
|
|
||||||
TODO
|
|
||||||
if (data->sway_layer) {
|
|
||||||
is_subsurface = data->sway_layer->layer_surface->surface != surface;
|
|
||||||
enum zwlr_layer_shell_v1_layer layer = data->sway_layer->layer;
|
|
||||||
should_optimize_blur = config->blur_xray
|
|
||||||
&& layer != ZWLR_LAYER_SHELL_V1_LAYER_BOTTOM
|
|
||||||
&& layer != ZWLR_LAYER_SHELL_V1_LAYER_BACKGROUND;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
// render blur
|
// render blur
|
||||||
if (deco_data.blur && config_should_parameters_blur() && !is_subsurface) {
|
if (deco_data.blur && config_should_parameters_blur() && !is_subsurface) {
|
||||||
|
@ -503,6 +489,7 @@ static void render_layer_iterator(struct sway_output *output,
|
||||||
render_surface_iterator(output, view, surface, _box, _data);
|
render_surface_iterator(output, view, surface, _box, _data);
|
||||||
|
|
||||||
struct render_data *data = _data;
|
struct render_data *data = _data;
|
||||||
|
struct wlr_output *wlr_output = output->wlr_output;
|
||||||
struct wlr_box dst_box = *_box;
|
struct wlr_box dst_box = *_box;
|
||||||
pixman_region32_t *output_damage = data->damage;
|
pixman_region32_t *output_damage = data->damage;
|
||||||
|
|
||||||
|
@ -512,7 +499,7 @@ static void render_layer_iterator(struct sway_output *output,
|
||||||
|
|
||||||
// render shadow
|
// render shadow
|
||||||
if (deco_data.shadow && config_should_parameters_shadow() && !is_subsurface) {
|
if (deco_data.shadow && config_should_parameters_shadow() && !is_subsurface) {
|
||||||
int corner_radius = deco_data.corner_radius;
|
int corner_radius = deco_data.corner_radius *= wlr_output->scale;
|
||||||
render_box_shadow(output, output_damage, &dst_box, config->shadow_color,
|
render_box_shadow(output, output_damage, &dst_box, config->shadow_color,
|
||||||
config->shadow_blur_sigma, corner_radius);
|
config->shadow_blur_sigma, corner_radius);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue