decorations: restore old ToggleDecorations behavior

This reverts part of commit e39744f1d3.
This commit is contained in:
Tobias Bengfort 2024-04-18 13:36:51 +02:00
parent a8f98cb90b
commit 873393a8da
2 changed files with 0 additions and 27 deletions

View file

@ -120,14 +120,6 @@ Actions are used in menus and keyboard/mouse bindings.
*<action name="ToggleDecorations" />* *<action name="ToggleDecorations" />*
Toggle decorations of focused window. Toggle decorations of focused window.
This is a 3-state action which can be executed multiple times:
- Only the titlebar will be hidden, borders and resize area are kept
- Remaining decorations will be disabled
- Decorations will be shown normally
By disabling the theme configuration 'keepBorder' the first step
will be removed and the action only toggles between on and off.
*<action name="ToggleFullscreen" />* *<action name="ToggleFullscreen" />*
Toggle fullscreen state of focused window. Toggle fullscreen state of focused window.

View file

@ -1198,24 +1198,6 @@ view_toggle_decorations(struct view *view)
{ {
assert(view); assert(view);
/* Reject decoration toggles when shaded */
if (view->shaded) {
return;
}
if (rc.ssd_keep_border && view->ssd_enabled && view->ssd
&& !view->ssd_titlebar_hidden) {
/*
* ssd_titlebar_hidden has to be set before calling
* ssd_titlebar_hide() to make ssd_thickness() happy.
*/
view->ssd_titlebar_hidden = true;
ssd_titlebar_hide(view->ssd);
if (!view_is_floating(view)) {
view_apply_special_geometry(view);
}
return;
}
view_set_decorations(view, !view->ssd_enabled); view_set_decorations(view, !view->ssd_enabled);
} }
@ -1313,7 +1295,6 @@ view_set_decorations(struct view *view, bool decorations)
decorate(view); decorate(view);
} else { } else {
undecorate(view); undecorate(view);
view->ssd_titlebar_hidden = false;
} }
if (!view_is_floating(view)) { if (!view_is_floating(view)) {
view_apply_special_geometry(view); view_apply_special_geometry(view);