add MoveRelative to man page and use view->pending

This commit is contained in:
Ph42oN 2023-06-27 21:17:57 +03:00
parent c17bf68176
commit c53896acc6
2 changed files with 5 additions and 1 deletions

View file

@ -48,6 +48,10 @@ Actions are used in menus and keyboard/mouse bindings.
*<action name="MoveTo" x="" y="" />* *<action name="MoveTo" x="" y="" />*
Move to position (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" />* *<action name="SnapToEdge" direction="value" />*
Resize window to fill half the output in the given direction. Supports Resize window to fill half the output in the given direction. Supports
directions "left", "up", "right", "down" and "center". directions "left", "up", "right", "down" and "center".

View file

@ -614,7 +614,7 @@ actions_run(struct view *activator, struct server *server,
if (view) { if (view) {
int x = get_arg_value_int(action, "x", 0); int x = get_arg_value_int(action, "x", 0);
int y = get_arg_value_int(action, "y", 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; break;
case ACTION_TYPE_GO_TO_DESKTOP: { case ACTION_TYPE_GO_TO_DESKTOP: {