summaryrefslogtreecommitdiff
path: root/sway/desktop/layer_shell.c
diff options
context:
space:
mode:
authorErik Reider <[email protected]>2023-04-17 23:24:48 +0200
committerGitHub <[email protected]>2023-04-17 23:24:48 +0200
commitcbfb7af7fd4728f993124e81f8666a2e8cee6085 (patch)
tree081e51028d59da49480be6bff9c580bbdadca9cd /sway/desktop/layer_shell.c
parent7d774f769cec2faec25d01120b05589a34b4eb0b (diff)
Add kawase blur (#120)
Co-authored-by: Erik Reider <[email protected]> Co-authored-by: Will McKinnon <[email protected]>
Diffstat (limited to 'sway/desktop/layer_shell.c')
-rw-r--r--sway/desktop/layer_shell.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/sway/desktop/layer_shell.c b/sway/desktop/layer_shell.c
index 6e3cc0e2..a8356ad7 100644
--- a/sway/desktop/layer_shell.c
+++ b/sway/desktop/layer_shell.c
@@ -290,6 +290,12 @@ static void handle_surface_commit(struct wl_listener *listener, void *data) {
struct sway_output *output = wlr_output->data;
struct wlr_box old_extent = layer->extent;
+ // Rerender the static blur on change
+ if (layer->layer == ZWLR_LAYER_SHELL_V1_LAYER_BACKGROUND
+ || layer->layer == ZWLR_LAYER_SHELL_V1_LAYER_BOTTOM) {
+ output->renderer->blur_buffer_dirty = true;
+ }
+
bool layer_changed = false;
if (layer_surface->current.committed != 0
|| layer->mapped != layer_surface->mapped) {
@@ -366,6 +372,13 @@ static void handle_destroy(struct wl_listener *listener, void *data) {
struct wlr_output *wlr_output = sway_layer->layer_surface->output;
sway_assert(wlr_output, "wlr_layer_surface_v1 has null output");
struct sway_output *output = wlr_output->data;
+
+ // Rerender the static blur
+ if (sway_layer->layer == ZWLR_LAYER_SHELL_V1_LAYER_BACKGROUND
+ || sway_layer->layer == ZWLR_LAYER_SHELL_V1_LAYER_BOTTOM) {
+ output->renderer->blur_buffer_dirty = true;
+ }
+
arrange_layers(output);
transaction_commit_dirty();
wl_list_remove(&sway_layer->output_destroy.link);