diff options
| author | Furkan Sahin <furkan-dev@proton.me> | 2018-05-24 09:17:40 -0400 |
|---|---|---|
| committer | Furkan Sahin <furkan-dev@proton.me> | 2018-05-24 09:17:40 -0400 |
| commit | 6830ceefba5b6e33a5ede03bae2d62c5e99cdb87 (patch) | |
| tree | 7b2353b71994b78a013d68cd1c60ac88012b4c39 | |
| parent | d38a6ad5c39c4f9263fc999ddd7b13cccc89258b (diff) | |
| parent | 1fe8b23592486d3312520904c6a0443baba35c63 (diff) | |
Merge pull request #2028 from RyanDwyer/fix-move-workspace
Fix crash in move workspace to output command
| -rw-r--r-- | sway/tree/layout.c | 12 |
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, container_notify_child_title_changed(old_parent); container_notify_child_title_changed(new_parent); if (old_parent) { - arrange_children_of(old_parent); + if (old_parent->type == C_OUTPUT) { + arrange_output(old_parent); + } else { + arrange_children_of(old_parent); + } + } + if (new_parent->type == C_OUTPUT) { + arrange_output(new_parent); + } else { + arrange_children_of(new_parent); } - arrange_children_of(new_parent); // If view was moved to a fullscreen workspace, refocus the fullscreen view struct sway_container *new_workspace = container; if (new_workspace->type != C_WORKSPACE) { |
