aboutsummaryrefslogtreecommitdiff
path: root/sway/tree
diff options
context:
space:
mode:
authoremersion <contact@emersion.fr>2019-03-06 10:47:50 +0100
committerBrian Ashworth <bosrsf04@gmail.com>2019-03-06 11:50:23 -0500
commit8b6bd106aa92192e9e2aa6781e9b2e51f1e22fe2 (patch)
tree904b632a84d1614a74c5d6a7ffaa3399ae05d032 /sway/tree
parent19df2e590602abe0b5e1b53bc11debdb37be3fbe (diff)
Fix container_parent_layout for scratchpad windows
Diffstat (limited to 'sway/tree')
-rw-r--r--sway/tree/container.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/sway/tree/container.c b/sway/tree/container.c
index 33043941..a6142193 100644
--- a/sway/tree/container.c
+++ b/sway/tree/container.c
@@ -1163,7 +1163,10 @@ enum sway_container_layout container_parent_layout(struct sway_container *con) {
if (con->parent) {
return con->parent->layout;
}
- return con->workspace->layout;
+ if (con->workspace) {
+ return con->workspace->layout;
+ }
+ return L_NONE;
}
enum sway_container_layout container_current_parent_layout(