summaryrefslogtreecommitdiffstats
path: root/sway/commands
diff options
context:
space:
mode:
Diffstat (limited to 'sway/commands')
-rw-r--r--sway/commands/layout.c2
-rw-r--r--sway/commands/move.c7
-rw-r--r--sway/commands/resize.c8
3 files changed, 8 insertions, 9 deletions
diff --git a/sway/commands/layout.c b/sway/commands/layout.c
index 162173c5..4c49a627 100644
--- a/sway/commands/layout.c
+++ b/sway/commands/layout.c
@@ -49,7 +49,7 @@ struct cmd_results *cmd_layout(int argc, char **argv) {
49 } 49 }
50 } 50 }
51 51
52 arrange_windows(parent, parent->box.width, parent->box.height); 52 arrange_windows(parent, parent->width, parent->height);
53 53
54 return cmd_results_new(CMD_SUCCESS, NULL, NULL); 54 return cmd_results_new(CMD_SUCCESS, NULL, NULL);
55} 55}
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) {
diff --git a/sway/commands/resize.c b/sway/commands/resize.c
index 8e295f65..93c1fe7d 100644
--- a/sway/commands/resize.c
+++ b/sway/commands/resize.c
@@ -48,11 +48,11 @@ static enum resize_axis parse_resize_axis(const char *axis) {
48} 48}
49 49
50static int parallel_coord(struct sway_container *c, enum resize_axis a) { 50static int parallel_coord(struct sway_container *c, enum resize_axis a) {
51 return a == RESIZE_AXIS_HORIZONTAL ? c->box.x : c->box.y; 51 return a == RESIZE_AXIS_HORIZONTAL ? c->x : c->y;
52} 52}
53 53
54static int parallel_size(struct sway_container *c, enum resize_axis a) { 54static int parallel_size(struct sway_container *c, enum resize_axis a) {
55 return a == RESIZE_AXIS_HORIZONTAL ? c->box.width : c->box.height; 55 return a == RESIZE_AXIS_HORIZONTAL ? c->width : c->height;
56} 56}
57 57
58static void resize_tiled(int amount, enum resize_axis axis) { 58static void resize_tiled(int amount, enum resize_axis axis) {
@@ -196,10 +196,10 @@ static void resize(int amount, enum resize_axis axis, enum resize_unit unit) {
196 float pct = amount / 100.0f; 196 float pct = amount / 100.0f;
197 switch (axis) { 197 switch (axis) {
198 case RESIZE_AXIS_HORIZONTAL: 198 case RESIZE_AXIS_HORIZONTAL:
199 amount = (float)current->box.width * pct; 199 amount = (float)current->width * pct;
200 break; 200 break;
201 case RESIZE_AXIS_VERTICAL: 201 case RESIZE_AXIS_VERTICAL:
202 amount = (float)current->box.height * pct; 202 amount = (float)current->height * pct;
203 break; 203 break;
204 default: 204 default:
205 sway_assert(0, "invalid resize axis"); 205 sway_assert(0, "invalid resize axis");