action: add ResizeRelative

This commit is contained in:
Ph42oN 2023-06-27 21:20:04 +03:00 committed by Consolatis
parent e40159470b
commit ea623daaee
4 changed files with 36 additions and 0 deletions

View file

@ -203,6 +203,17 @@ view_move_resize(struct view *view, struct wlr_box geo)
}
}
void
view_resize_relative(struct view *view, int left, int right, int top, int bottom)
{
struct wlr_box newgeo = view->pending;
newgeo.x -= left;
newgeo.width += left + right;
newgeo.y -= top;
newgeo.height += top + bottom;
view_move_resize(view, newgeo);
}
void
view_adjust_size(struct view *view, int *w, int *h)
{