action: implicitely unmaximize when unsnapping

Co-authored-by: tokyo4j <hrak1529@gmail.com>
This commit is contained in:
Jens Peters 2024-09-24 06:39:21 +02:00 committed by Hiroaki Yamamoto
parent 694c5a7469
commit b9414d8b8d
2 changed files with 5 additions and 4 deletions

View file

@ -1172,8 +1172,9 @@ actions_run(struct view *activator, struct server *server,
}
break;
case ACTION_TYPE_UNSNAP:
if (view && view->maximized == VIEW_AXIS_NONE && !view->fullscreen
&& view_is_tiled(view)) {
if (view && !view->fullscreen && !view_is_floating(view)) {
view_maximize(view, VIEW_AXIS_NONE,
/* store_natural_geometry */ false);
view_set_untiled(view);
view_apply_natural_geometry(view);
}