aboutsummaryrefslogtreecommitdiff
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
parent19df2e590602abe0b5e1b53bc11debdb37be3fbe (diff)
downloadsway-8b6bd106aa92192e9e2aa6781e9b2e51f1e22fe2.zip
sway-8b6bd106aa92192e9e2aa6781e9b2e51f1e22fe2.tar.gz
sway-8b6bd106aa92192e9e2aa6781e9b2e51f1e22fe2.tar.bz2
Fix container_parent_layout for scratchpad windows
-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 3304394..a614219 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(