summaryrefslogtreecommitdiffstats
path: root/sway/commands/move.c
diff options
context:
space:
mode:
Diffstat (limited to 'sway/commands/move.c')
-rw-r--r--sway/commands/move.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/sway/commands/move.c b/sway/commands/move.c
index c954ab94..e8668ce7 100644
--- a/sway/commands/move.c
+++ b/sway/commands/move.c
@@ -95,7 +95,8 @@ static struct cmd_results *cmd_move_container(struct sway_container *current,
95 } 95 }
96 struct sway_container *source = container_parent(current, C_OUTPUT); 96 struct sway_container *source = container_parent(current, C_OUTPUT);
97 struct sway_container *destination = output_in_direction(argv[3], 97 struct sway_container *destination = output_in_direction(argv[3],
98 source->sway_output->wlr_output, current->x, current->y); 98 source->sway_output->wlr_output,
99 current->box.x, current->box.y);
99 if (!destination) { 100 if (!destination) {
100 return cmd_results_new(CMD_FAILURE, "move workspace", 101 return cmd_results_new(CMD_FAILURE, "move workspace",
101 "Can't find output with name/direction '%s'", argv[3]); 102 "Can't find output with name/direction '%s'", argv[3]);
@@ -124,8 +125,8 @@ static struct cmd_results *cmd_move_workspace(struct sway_container *current,
124 return cmd_results_new(CMD_INVALID, "move", expected_syntax); 125 return cmd_results_new(CMD_INVALID, "move", expected_syntax);
125 } 126 }
126 struct sway_container *source = container_parent(current, C_OUTPUT); 127 struct sway_container *source = container_parent(current, C_OUTPUT);
127 int center_x = current->width / 2 + current->x, 128 int center_x = current->box.width / 2 + current->box.x,
128 center_y = current->height / 2 + current->y; 129 center_y = current->box.height / 2 + current->box.y;
129 struct sway_container *destination = output_in_direction(argv[3], 130 struct sway_container *destination = output_in_direction(argv[3],
130 source->sway_output->wlr_output, center_x, center_y); 131 source->sway_output->wlr_output, center_x, center_y);
131 if (!destination) { 132 if (!destination) {