aboutsummaryrefslogtreecommitdiff
path: root/sway/commands
diff options
context:
space:
mode:
Diffstat (limited to 'sway/commands')
-rw-r--r--sway/commands/move.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/sway/commands/move.c b/sway/commands/move.c
index 1a05a7a6..0d0d9727 100644
--- a/sway/commands/move.c
+++ b/sway/commands/move.c
@@ -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;
}
}