view: add 'struct border margin'

Simplify various view interfaces as a result
This commit is contained in:
Johan Malm 2020-09-15 20:41:01 +01:00
parent 5a77c84fc8
commit 090e78b85a
9 changed files with 91 additions and 101 deletions

View file

@ -14,6 +14,9 @@ void interactive_begin(struct view *view, enum cursor_mode mode, uint32_t edges)
/* Remember view and cursor positions at start of move/resize */
server->grab_x = server->cursor->x;
server->grab_y = server->cursor->y;
server->grab_box = view_geometry(view);
struct wlr_box box = {
.x = view->x, .y = view->y, .width = view->w, .height = view->h
};
memcpy(&server->grab_box, &box, sizeof(struct wlr_box));
server->resize_edges = edges;
}