summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLibravatar Drew DeVault <sir@cmpwn.com>2017-03-19 17:57:44 -0400
committerLibravatar Drew DeVault <sir@cmpwn.com>2017-04-03 11:00:29 -0400
commita99a1f0cc9934c019b0d31ce030a32f77725865a (patch)
treea6873b68ec2123a293fc1c89658cea4e2ebdbfc3
parentMerge pull request #1126 from zandrmartin/prevent-fullscreen-focus-stealing (diff)
downloadsway-a99a1f0cc9934c019b0d31ce030a32f77725865a.tar.gz
sway-a99a1f0cc9934c019b0d31ce030a32f77725865a.tar.zst
sway-a99a1f0cc9934c019b0d31ce030a32f77725865a.zip
Merge pull request #1130 from oranenj/fix_move_next_crash
Fix move next crash
-rw-r--r--sway/container.c2
-rw-r--r--sway/layout.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/sway/container.c b/sway/container.c
index 2f656bd8..427f71a4 100644
--- a/sway/container.c
+++ b/sway/container.c
@@ -218,7 +218,7 @@ swayc_t *new_workspace(swayc_t *output, const char *name) {
218 swayc_t *workspace = new_swayc(C_WORKSPACE); 218 swayc_t *workspace = new_swayc(C_WORKSPACE);
219 219
220 workspace->prev_layout = L_NONE; 220 workspace->prev_layout = L_NONE;
221 workspace->layout = L_HORIZ; 221 workspace->layout = default_layout(output);
222 workspace->workspace_layout = default_layout(output); 222 workspace->workspace_layout = default_layout(output);
223 223
224 workspace->x = output->x; 224 workspace->x = output->x;
diff --git a/sway/layout.c b/sway/layout.c
index 5e144cd8..6a493df2 100644
--- a/sway/layout.c
+++ b/sway/layout.c
@@ -395,7 +395,7 @@ void move_container(swayc_t *container, enum movement_direction dir) {
395 sway_log(L_DEBUG, "container:%p, parent:%p, child %p,", 395 sway_log(L_DEBUG, "container:%p, parent:%p, child %p,",
396 container,parent,child); 396 container,parent,child);
397 if (parent->layout == layout 397 if (parent->layout == layout
398 || (layout == L_NONE && parent->type == C_CONTAINER) /* accept any layout for next/prev direction */ 398 || (layout == L_NONE && (parent->type == C_CONTAINER || parent->type == C_WORKSPACE)) /* accept any layout for next/prev direction */
399 || (parent->layout == L_TABBED && layout == L_HORIZ) 399 || (parent->layout == L_TABBED && layout == L_HORIZ)
400 || (parent->layout == L_STACKED && layout == L_VERT) 400 || (parent->layout == L_STACKED && layout == L_VERT)
401 || is_auto_layout(parent->layout)) { 401 || is_auto_layout(parent->layout)) {