diff options
| author | Furkan Sahin <furkan-dev@proton.me> | 2017-03-19 17:57:44 -0400 |
|---|---|---|
| committer | Furkan Sahin <furkan-dev@proton.me> | 2017-03-19 17:57:44 -0400 |
| commit | 2931fe97ae2c37aa1cedda76bbe95fb86fbeb8e8 (patch) | |
| tree | 7be02709fd7d81d1829810df24578faa73f77804 | |
| parent | d8854dcf3f9dfb3a8faf35277fcbe3d4866fd572 (diff) | |
| parent | 193b080e86b3042f9401f44c8fdb7f43803136e6 (diff) | |
Merge pull request #1130 from oranenj/fix_move_next_crash
Fix move next crash
| -rw-r--r-- | sway/container.c | 2 | ||||
| -rw-r--r-- | sway/layout.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/sway/container.c b/sway/container.c index d43ee35e..707aa4d8 100644 --- a/sway/container.c +++ b/sway/container.c @@ -218,7 +218,7 @@ swayc_t *new_workspace(swayc_t *output, const char *name) { swayc_t *workspace = new_swayc(C_WORKSPACE); workspace->prev_layout = L_NONE; - workspace->layout = L_HORIZ; + workspace->layout = default_layout(output); workspace->workspace_layout = default_layout(output); workspace->x = output->x; diff --git a/sway/layout.c b/sway/layout.c index 473b74f7..69291daf 100644 --- a/sway/layout.c +++ b/sway/layout.c @@ -417,7 +417,7 @@ void move_container(swayc_t *container, enum movement_direction dir, int move_am sway_log(L_DEBUG, "container:%p, parent:%p, child %p,", container,parent,child); if (parent->layout == layout - || (layout == L_NONE && parent->type == C_CONTAINER) /* accept any layout for next/prev direction */ + || (layout == L_NONE && (parent->type == C_CONTAINER || parent->type == C_WORKSPACE)) /* accept any layout for next/prev direction */ || (parent->layout == L_TABBED && layout == L_HORIZ) || (parent->layout == L_STACKED && layout == L_VERT) || is_auto_layout(parent->layout)) { |
