]> git.mdlowis.com Git - proto/labwc.git/commitdiff
action: implicitely unmaximize when unsnapping
authorJens Peters <jp7677@gmail.com>
Tue, 24 Sep 2024 04:39:21 +0000 (06:39 +0200)
committerHiroaki Yamamoto <hrak1529@gmail.com>
Wed, 25 Sep 2024 08:59:10 +0000 (17:59 +0900)
Co-authored-by: tokyo4j <hrak1529@gmail.com>
docs/labwc-actions.5.scd
src/action.c

index 8aaae041e2a7b3427716b6a8142db1a3c60201ae..8f37fdcaf99634b69e3f938697b67d774213c0bb 100644 (file)
@@ -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.
 
 *<action name="UnSnap" />*
-       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.
 
 *<action name="NextWindow" />*++
 *<action name="PreviousWindow" />*
index de259e88daa0636a416e187991f961a9e121b73c..c5ed4eccb5b6f500984737787658e52f87cf31de 100644 (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);
                        }