Merge pull request #1130 from oranenj/fix_move_next_crash

Fix move next crash
This commit is contained in:
Drew DeVault 2017-03-19 17:57:44 -04:00 committed by GitHub
commit e659db4f73
2 changed files with 2 additions and 2 deletions

View File

@ -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;

View File

@ -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)) {