diff --git a/include/sway/desktop/fx_renderer/fx_renderer.h b/include/sway/desktop/fx_renderer/fx_renderer.h index c6f8a6cf..b57ad6d7 100644 --- a/include/sway/desktop/fx_renderer/fx_renderer.h +++ b/include/sway/desktop/fx_renderer/fx_renderer.h @@ -33,7 +33,6 @@ struct decoration_data { float *dim_color; bool has_titlebar; bool blur; - bool can_blur_xray; bool shadow; }; diff --git a/sway/desktop/fx_renderer/fx_renderer.c b/sway/desktop/fx_renderer/fx_renderer.c index d23906d9..ee9d373f 100644 --- a/sway/desktop/fx_renderer/fx_renderer.c +++ b/sway/desktop/fx_renderer/fx_renderer.c @@ -45,8 +45,7 @@ struct decoration_data get_undecorated_decoration_data() { .saturation = 1.0f, .has_titlebar = false, .blur = false, - .can_blur_xray = false, \ - .shadow = false, \ + .shadow = false, }; } diff --git a/sway/desktop/layer_shell.c b/sway/desktop/layer_shell.c index 4b6e90f6..9d0ed310 100644 --- a/sway/desktop/layer_shell.c +++ b/sway/desktop/layer_shell.c @@ -24,8 +24,6 @@ static void layer_parse_criteria(struct sway_layer_surface *sway_layer) { return; } - sway_layer->deco_data.can_blur_xray = layer != ZWLR_LAYER_SHELL_V1_LAYER_BOTTOM; - list_t *criterias = layer_criterias_for_sway_layer_surface(sway_layer); for (int i = 0; i < criterias->length; i++) { struct layer_criteria *criteria = criterias->items[i]; diff --git a/sway/desktop/render.c b/sway/desktop/render.c index da323144..37b8a273 100644 --- a/sway/desktop/render.c +++ b/sway/desktop/render.c @@ -443,13 +443,17 @@ static void render_surface_iterator(struct sway_output *output, // render blur (view->surface == surface excludes blurring subsurfaces) bool is_subsurface = false; - bool should_optimize_blur = deco_data.can_blur_xray && config->blur_xray; + bool should_optimize_blur = false; if (view) { is_subsurface = view->surface != surface; should_optimize_blur = !container_is_floating(view->container) || config->blur_xray; } 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; } if (deco_data.blur && should_parameters_blur() && !is_subsurface) { pixman_region32_t opaque_region; @@ -1413,7 +1417,6 @@ static void render_containers_linear(struct sway_output *output, .saturation = child->saturation, .has_titlebar = has_titlebar, .blur = child->blur_enabled, - .can_blur_xray = true, .shadow = child->shadow_enabled, }; render_view(output, damage, child, colors, deco_data); @@ -1464,7 +1467,6 @@ static void render_containers_tabbed(struct sway_output *output, .saturation = current->saturation, .has_titlebar = true, .blur = current->blur_enabled, - .can_blur_xray = true, }; // Render tabs @@ -1560,7 +1562,6 @@ static void render_containers_stacked(struct sway_output *output, ? 0 : current->corner_radius, .has_titlebar = true, .blur = current->blur_enabled, - .can_blur_xray = true, }; // Render titles @@ -1708,7 +1709,6 @@ static void render_floating_container(struct sway_output *soutput, .corner_radius = con->corner_radius, .has_titlebar = has_titlebar, .blur = con->blur_enabled, - .can_blur_xray = true, .shadow = con->shadow_enabled, }; render_view(soutput, damage, con, colors, deco_data); @@ -1936,7 +1936,6 @@ void output_render(struct sway_output *output, struct timespec *when, .saturation = focus->saturation, .has_titlebar = false, .blur = false, - .can_blur_xray = false, .shadow = false, }; render_view_popups(focus->view, output, damage, deco_data);