diff --git a/docs/window-management/rules.md b/docs/window-management/rules.md index 12f6b3f4..3ef98d35 100644 --- a/docs/window-management/rules.md +++ b/docs/window-management/rules.md @@ -240,7 +240,7 @@ layerrule=layer_name:Values,Parameter:Values,Parameter:Values | `noblur` | integer | `0` / `1` | Disable blur | | `noanim` | integer | `0` / `1` | Disable layer animation | | `noshadow` | integer | `0` / `1` | Disable layer shadow | -| `shield_when_capture`| integer | `0` / `1` | Shield layer when captured | +| `shield_when_capture`| integer | `0` / `1` | Shield layer when captured.(it is better to combination with `noanim:1`) | > **Tip:** For animation types, see [Animations](/docs/visuals/animations#animation-types). For visual effects, see [Window Effects](/docs/visuals/effects). diff --git a/src/animation/layer.h b/src/animation/layer.h index 59d8833e..f6cc9374 100644 --- a/src/animation/layer.h +++ b/src/animation/layer.h @@ -354,6 +354,10 @@ void init_fadeout_layers(LayerSurface *l) { if (!l->mon || !l->scene) return; + if (l->shield_when_capture) { + return; + } + if ((l->animation_type_close && strcmp(l->animation_type_close, "none") == 0) || (!l->animation_type_close &&