diff options
author | Drew DeVault <sir@cmpwn.com> | 2018-04-06 15:09:52 -0400 |
---|---|---|
committer | Drew DeVault <sir@cmpwn.com> | 2018-04-06 15:09:52 -0400 |
commit | 5ff16994c57375c9b0b842a2f63e7d15984aeadd (patch) | |
tree | 58dee268e38eafcb2bacd1a728596a4e14fc0ed0 | |
parent | Fix another of @orestisf1993's issues (diff) | |
download | sway-5ff16994c57375c9b0b842a2f63e7d15984aeadd.tar.gz sway-5ff16994c57375c9b0b842a2f63e7d15984aeadd.tar.zst sway-5ff16994c57375c9b0b842a2f63e7d15984aeadd.zip |
Address @emersion feedback
-rw-r--r-- | sway/debug-tree.c | 2 | ||||
-rw-r--r-- | sway/tree/layout.c | 7 |
2 files changed, 6 insertions, 3 deletions
diff --git a/sway/debug-tree.c b/sway/debug-tree.c index 00501d9c..07c48a25 100644 --- a/sway/debug-tree.c +++ b/sway/debug-tree.c | |||
@@ -91,7 +91,7 @@ void update_debug_tree() { | |||
91 | break; | 91 | break; |
92 | } | 92 | } |
93 | 93 | ||
94 | struct sway_container *focus; | 94 | struct sway_container *focus = NULL; |
95 | if (seat != NULL) { | 95 | if (seat != NULL) { |
96 | focus = seat_get_focus(seat); | 96 | focus = seat_get_focus(seat); |
97 | } | 97 | } |
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. */ | ||
253 | static void workspace_rejigger(struct sway_container *ws, | 256 | static 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, |