ssd: Simplify ssd_create()

- Add `active` argument for consistency with `ssd_set_active()`
- `assert()` that `ssd_create()` is not called twice without an
  `ssd_destroy()` in between
This commit is contained in:
John Lindgren 2022-11-26 02:17:04 -05:00 committed by Johan Malm
parent ac9228e7f8
commit 4e7891eb8d
3 changed files with 6 additions and 11 deletions

View file

@ -557,7 +557,7 @@ view_set_decorations(struct view *view, bool decorations)
assert(view);
if (view->ssd_enabled != decorations && !view->fullscreen) {
if (decorations) {
ssd_create(view);
ssd_create(view, view == view->server->focused_view);
} else {
ssd_destroy(view);
}
@ -877,7 +877,7 @@ view_reload_ssd(struct view *view)
assert(view);
if (view->ssd_enabled) {
ssd_destroy(view);
ssd_create(view);
ssd_create(view, view == view->server->focused_view);
}
}