aboutsummaryrefslogtreecommitdiffstats
path: root/sway/tree/layout.c
diff options
context:
space:
mode:
authorLibravatar Ryan Dwyer <ryandwyer1@gmail.com>2018-05-24 23:01:17 +1000
committerLibravatar Ryan Dwyer <ryandwyer1@gmail.com>2018-05-24 23:01:17 +1000
commitc9630975dae359ed7b42c205cac3c65252e38de5 (patch)
tree7b2353b71994b78a013d68cd1c60ac88012b4c39 /sway/tree/layout.c
parentMerge pull request #2025 from RyanDwyer/fix-nested-tabs (diff)
downloadsway-c9630975dae359ed7b42c205cac3c65252e38de5.tar.gz
sway-c9630975dae359ed7b42c205cac3c65252e38de5.tar.zst
sway-c9630975dae359ed7b42c205cac3c65252e38de5.zip
Fix crash in move workspace to output command
Fixes #2026.
Diffstat (limited to 'sway/tree/layout.c')
-rw-r--r--sway/tree/layout.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/sway/tree/layout.c b/sway/tree/layout.c
index f8acdf6c..91759f7b 100644
--- a/sway/tree/layout.c
+++ b/sway/tree/layout.c
@@ -187,9 +187,17 @@ void container_move_to(struct sway_container *container,
187 container_notify_child_title_changed(old_parent); 187 container_notify_child_title_changed(old_parent);
188 container_notify_child_title_changed(new_parent); 188 container_notify_child_title_changed(new_parent);
189 if (old_parent) { 189 if (old_parent) {
190 arrange_children_of(old_parent); 190 if (old_parent->type == C_OUTPUT) {
191 arrange_output(old_parent);
192 } else {
193 arrange_children_of(old_parent);
194 }
195 }
196 if (new_parent->type == C_OUTPUT) {
197 arrange_output(new_parent);
198 } else {
199 arrange_children_of(new_parent);
191 } 200 }
192 arrange_children_of(new_parent);
193 // If view was moved to a fullscreen workspace, refocus the fullscreen view 201 // If view was moved to a fullscreen workspace, refocus the fullscreen view
194 struct sway_container *new_workspace = container; 202 struct sway_container *new_workspace = container;
195 if (new_workspace->type != C_WORKSPACE) { 203 if (new_workspace->type != C_WORKSPACE) {