diff --git a/kiwmi/desktop/layer_shell.c b/kiwmi/desktop/layer_shell.c index a3bd08a..b00bced 100644 --- a/kiwmi/desktop/layer_shell.c +++ b/kiwmi/desktop/layer_shell.c @@ -9,6 +9,7 @@ #include +#include #include #include #include @@ -46,6 +47,8 @@ kiwmi_layer_commit_notify(struct wl_listener *listener, void *UNUSED(data)) bool layer_changed = layer->layer != layer->layer_surface->current.layer; bool geom_changed = memcmp(&old_geom, &layer->geom, sizeof(old_geom)) != 0; + bool buffer_changed = pixman_region32_not_empty( + &layer->layer_surface->surface->buffer_damage); if (layer_changed) { wl_list_remove(&layer->link); @@ -53,7 +56,7 @@ kiwmi_layer_commit_notify(struct wl_listener *listener, void *UNUSED(data)) wl_list_insert(&output->layers[layer->layer], &layer->link); } - if (layer_changed || geom_changed) { + if (buffer_changed || layer_changed || geom_changed) { output->damaged = 2; } } diff --git a/kiwmi/desktop/output.c b/kiwmi/desktop/output.c index ea697af..bb64f72 100644 --- a/kiwmi/desktop/output.c +++ b/kiwmi/desktop/output.c @@ -9,6 +9,7 @@ #include +#include #include #include #include diff --git a/kiwmi/desktop/xdg_shell.c b/kiwmi/desktop/xdg_shell.c index b731d5c..a90b563 100644 --- a/kiwmi/desktop/xdg_shell.c +++ b/kiwmi/desktop/xdg_shell.c @@ -9,6 +9,7 @@ #include +#include #include #include #include