decorations: add SetDecorations action

This commit is contained in:
Tobias Bengfort 2024-04-20 06:29:51 +02:00 committed by Johan Malm
parent e2590f10fd
commit 41a3b68846
6 changed files with 62 additions and 0 deletions

View file

@ -1249,6 +1249,17 @@ view_wants_decorations(struct view *view)
}
}
void
view_set_decorations(struct view *view, enum ssd_mode mode, bool force_ssd)
{
assert(view);
if (force_ssd || !view_wants_decorations(view)
|| mode < view_get_ssd_mode(view)) {
view_set_ssd_mode(view, mode);
}
}
void
view_toggle_decorations(struct view *view)
{