]> git.mdlowis.com Git - proto/labwc.git/commitdiff
add MoveRelative to man page and use view->pending
authorPh42oN <julle.ys.57@gmail.com>
Tue, 27 Jun 2023 18:17:57 +0000 (21:17 +0300)
committerConsolatis <35009135+Consolatis@users.noreply.github.com>
Tue, 27 Jun 2023 18:59:33 +0000 (20:59 +0200)
docs/labwc-actions.5.scd
src/action.c

index a31c77b84523a61dea1c0f4b0dff63b2ac110d8f..e2ba6217bbb0ca3175f5f0b7258ddc4e44d1ddb5 100644 (file)
@@ -48,6 +48,10 @@ Actions are used in menus and keyboard/mouse bindings.
 *<action name="MoveTo" x="" y="" />*
        Move to position (x, y)
 
+*<action name="MoveRelative" x="" y="" />*
+       Move window relative to its current position. Positive value of x moves
+       it right, negative left. Positive value of y moves it down, negative up.
+
 *<action name="SnapToEdge" direction="value" />*
        Resize window to fill half the output in the given direction. Supports
        directions "left", "up", "right", "down" and "center".
index d54c657a3e561d193da354ff45b2f8c4b8f788d3..34305358be151a28383c58c6961608ea9245cd87 100644 (file)
@@ -614,7 +614,7 @@ actions_run(struct view *activator, struct server *server,
                        if (view) {
                                int x = get_arg_value_int(action, "x", 0);
                                int y = get_arg_value_int(action, "y", 0);
-                               view_move(view, view->current.x + x, view->current.y + y);
+                               view_move(view, view->pending.x + x, view->pending.y + y);
                        }
                        break;
                case ACTION_TYPE_GO_TO_DESKTOP: {