view: Reuse view_set_decorations() in view_toggle_decorations()

This simply deduplicates some near-identical code.
This commit is contained in:
John Lindgren 2022-11-16 16:42:37 -05:00
parent 1abede188e
commit f1ba08a6c9

View file

@ -466,15 +466,7 @@ view_toggle_maximize(struct view *view)
void void
view_toggle_decorations(struct view *view) view_toggle_decorations(struct view *view)
{ {
if (!view->fullscreen) { view_set_decorations(view, !view->ssd.enabled);
view->ssd.enabled = !view->ssd.enabled;
ssd_update_geometry(view);
if (view->maximized) {
view_apply_maximized_geometry(view);
} else if (view->tiled) {
view_apply_tiled_geometry(view, NULL);
}
}
} }
static bool static bool