From: Jens Peters Date: Tue, 24 Sep 2024 04:39:21 +0000 (+0200) Subject: action: implicitely unmaximize when unsnapping X-Git-Url: https://git.mdlowis.com/?a=commitdiff_plain;h=b9414d8b8dc5d6e8a5123f0aea65dd13b1043ecc;p=proto%2Flabwc.git action: implicitely unmaximize when unsnapping Co-authored-by: tokyo4j --- diff --git a/docs/labwc-actions.5.scd b/docs/labwc-actions.5.scd index 8aaae041..8f37fdca 100644 --- a/docs/labwc-actions.5.scd +++ b/docs/labwc-actions.5.scd @@ -109,8 +109,8 @@ Actions are used in menus and keyboard/mouse bindings. See labwc-config(5) for further information on how to define regions. ** - Resize and move active window back to its untiled position if - it had been tiled to a direction or region. + Resize and move the active window back to its untiled or unmaximized + position if it had been maximized or tiled to a direction or region. **++ ** diff --git a/src/action.c b/src/action.c index de259e88..c5ed4ecc 100644 --- a/src/action.c +++ b/src/action.c @@ -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); }