mirror of
https://github.com/swaywm/sway.git
synced 2026-03-25 09:07:17 -04:00
chore: chase wlr_output_layout_get_box() update
https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/3439
This commit is contained in:
parent
69b430201c
commit
ee7668c1f2
7 changed files with 53 additions and 49 deletions
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue