aboutsummaryrefslogtreecommitdiffstats
path: root/sway/tree
diff options
context:
space:
mode:
authorLibravatar Drew DeVault <sir@cmpwn.com>2018-04-06 15:09:52 -0400
committerLibravatar Drew DeVault <sir@cmpwn.com>2018-04-06 15:09:52 -0400
commit5ff16994c57375c9b0b842a2f63e7d15984aeadd (patch)
tree58dee268e38eafcb2bacd1a728596a4e14fc0ed0 /sway/tree
parentFix another of @orestisf1993's issues (diff)
downloadsway-5ff16994c57375c9b0b842a2f63e7d15984aeadd.tar.gz
sway-5ff16994c57375c9b0b842a2f63e7d15984aeadd.tar.zst
sway-5ff16994c57375c9b0b842a2f63e7d15984aeadd.zip
Address @emersion feedback
Diffstat (limited to 'sway/tree')
-rw-r--r--sway/tree/layout.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/sway/tree/layout.c b/sway/tree/layout.c
index b03b80d9..7296423b 100644
--- a/sway/tree/layout.c
+++ b/sway/tree/layout.c
@@ -250,6 +250,9 @@ static int container_limit(struct sway_container *container,
250 return move_offs(move_dir) < 0 ? 0 : container->children->length - 1; 250 return move_offs(move_dir) < 0 ? 0 : container->children->length - 1;
251} 251}
252 252
253/* Takes one child, sets it aside, wraps the rest of the children in a new
254 * container, switches the layout of the workspace, and drops the child back in.
255 * In other words, rejigger it. */
253static void workspace_rejigger(struct sway_container *ws, 256static void workspace_rejigger(struct sway_container *ws,
254 struct sway_container *child, enum movement_direction move_dir) { 257 struct sway_container *child, enum movement_direction move_dir) {
255 struct sway_container *original_parent = child->parent; 258 struct sway_container *original_parent = child->parent;
@@ -311,8 +314,8 @@ void container_move(struct sway_container *container,
311 sway_dir_to_wlr(move_dir, &wlr_dir); 314 sway_dir_to_wlr(move_dir, &wlr_dir);
312 double ref_x = current->x + current->width / 2; 315 double ref_x = current->x + current->width / 2;
313 double ref_y = current->y + current->height / 2; 316 double ref_y = current->y + current->height / 2;
314 ref_x += current->sway_output->wlr_output->lx; 317 ref_x += current->sway_output->swayc->x;
315 ref_y += current->sway_output->wlr_output->ly; 318 ref_y += current->sway_output->swayc->y;
316 struct wlr_output *next = wlr_output_layout_adjacent_output( 319 struct wlr_output *next = wlr_output_layout_adjacent_output(
317 root_container.sway_root->output_layout, wlr_dir, 320 root_container.sway_root->output_layout, wlr_dir,
318 current->sway_output->wlr_output, 321 current->sway_output->wlr_output,