view: Use wlr_box for current/pending geometry

This commit is contained in:
John Lindgren 2023-02-08 23:19:14 -05:00
parent 3941991505
commit b75dbd5b38
15 changed files with 169 additions and 186 deletions

View file

@ -27,14 +27,15 @@ popup_unconstrain(struct view *view, struct wlr_xdg_popup *popup)
struct wlr_box *popup_box = &popup->current.geometry;
struct wlr_output_layout *output_layout = server->output_layout;
struct wlr_output *wlr_output = wlr_output_layout_output_at(
output_layout, view->x + popup_box->x, view->y + popup_box->y);
output_layout, view->current.x + popup_box->x,
view->current.y + popup_box->y);
struct wlr_box output_box;
wlr_output_layout_get_box(output_layout, wlr_output, &output_box);
struct wlr_box output_toplevel_box = {
.x = output_box.x - view->x,
.y = output_box.y - view->y,
.x = output_box.x - view->current.x,
.y = output_box.y - view->current.y,
.width = output_box.width,
.height = output_box.height,
};