Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix move next crash #1130

Merged
merged 2 commits into from
Mar 19, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion sway/container.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion sway/layout.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)) {
Expand Down