diff options
author | Drew DeVault <sir@cmpwn.com> | 2018-04-06 16:16:05 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-04-06 16:16:05 -0400 |
commit | 5c31b06d88135a62bd917a61e770c8219f6d5d72 (patch) | |
tree | 4323a9130346ca4d836b0ae70c03877e13310bfc /sway/commands/move.c | |
parent | Merge pull request #1757 from swaywm/boooooooxes (diff) | |
parent | Revert "Break everything^W^WUse wlr_box for sway_container" (diff) | |
download | sway-5c31b06d88135a62bd917a61e770c8219f6d5d72.tar.gz sway-5c31b06d88135a62bd917a61e770c8219f6d5d72.tar.zst sway-5c31b06d88135a62bd917a61e770c8219f6d5d72.zip |
Merge pull request #1758 from swaywm/revert-1757-boooooooxes
Revert "Break everything^W^WUse wlr_box for sway_container"
Diffstat (limited to 'sway/commands/move.c')
-rw-r--r-- | sway/commands/move.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/sway/commands/move.c b/sway/commands/move.c index e8668ce7..c954ab94 100644 --- a/sway/commands/move.c +++ b/sway/commands/move.c | |||
@@ -95,8 +95,7 @@ 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, | 98 | source->sway_output->wlr_output, current->x, current->y); |
99 | current->box.x, current->box.y); | ||
100 | if (!destination) { | 99 | if (!destination) { |
101 | return cmd_results_new(CMD_FAILURE, "move workspace", | 100 | return cmd_results_new(CMD_FAILURE, "move workspace", |
102 | "Can't find output with name/direction '%s'", argv[3]); | 101 | "Can't find output with name/direction '%s'", argv[3]); |
@@ -125,8 +124,8 @@ static struct cmd_results *cmd_move_workspace(struct sway_container *current, | |||
125 | return cmd_results_new(CMD_INVALID, "move", expected_syntax); | 124 | return cmd_results_new(CMD_INVALID, "move", expected_syntax); |
126 | } | 125 | } |
127 | struct sway_container *source = container_parent(current, C_OUTPUT); | 126 | struct sway_container *source = container_parent(current, C_OUTPUT); |
128 | int center_x = current->box.width / 2 + current->box.x, | 127 | int center_x = current->width / 2 + current->x, |
129 | center_y = current->box.height / 2 + current->box.y; | 128 | center_y = current->height / 2 + current->y; |
130 | struct sway_container *destination = output_in_direction(argv[3], | 129 | struct sway_container *destination = output_in_direction(argv[3], |
131 | source->sway_output->wlr_output, center_x, center_y); | 130 | source->sway_output->wlr_output, center_x, center_y); |
132 | if (!destination) { | 131 | if (!destination) { |