chore: chase wlr_output_layout_get_box() update

https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/3439
This commit is contained in:
Kirill Primak 2022-01-29 23:11:54 +03:00 committed by Simon Ser
parent 69b430201c
commit ee7668c1f2
7 changed files with 53 additions and 49 deletions

View file

@ -788,15 +788,15 @@ static struct cmd_results *cmd_move_to_position_pointer(
struct wlr_output *output = wlr_output_layout_output_at(
root->output_layout, cursor->x, cursor->y);
if (output) {
struct wlr_box *box =
wlr_output_layout_get_box(root->output_layout, output);
lx = fmax(lx, box->x);
ly = fmax(ly, box->y);
if (lx + container->pending.width > box->x + box->width) {
lx = box->x + box->width - container->pending.width;
struct wlr_box box;
wlr_output_layout_get_box(root->output_layout, output, &box);
lx = fmax(lx, box.x);
ly = fmax(ly, box.y);
if (lx + container->pending.width > box.x + box.width) {
lx = box.x + box.width - container->pending.width;
}
if (ly + container->pending.height > box->y + box->height) {
ly = box->y + box->height - container->pending.height;
if (ly + container->pending.height > box.y + box.height) {
ly = box.y + box.height - container->pending.height;
}
}