diff options
author | Ronan Pigott <rpigott@berkeley.edu> | 2020-01-14 17:08:01 -0700 |
---|---|---|
committer | Drew DeVault <sir@cmpwn.com> | 2020-01-22 13:30:52 -0500 |
commit | c52b1cf45ab1be0e6fcc323eb4889c7bd767ba3f (patch) | |
tree | 6408bce58a4de66fa7c85b325c33bd7e5ece6730 /sway/tree/container.c | |
parent | desktop/output: fix mem leak in handle_new_output (diff) | |
download | sway-c52b1cf45ab1be0e6fcc323eb4889c7bd767ba3f.tar.gz sway-c52b1cf45ab1be0e6fcc323eb4889c7bd767ba3f.tar.zst sway-c52b1cf45ab1be0e6fcc323eb4889c7bd767ba3f.zip |
Fix crash when showing scratchpad hidden split containers
Diffstat (limited to 'sway/tree/container.c')
-rw-r--r-- | sway/tree/container.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/sway/tree/container.c b/sway/tree/container.c index aa819be7..56cdee1d 100644 --- a/sway/tree/container.c +++ b/sway/tree/container.c | |||
@@ -1527,3 +1527,10 @@ void container_raise_floating(struct sway_container *con) { | |||
1527 | bool container_is_scratchpad_hidden(struct sway_container *con) { | 1527 | bool container_is_scratchpad_hidden(struct sway_container *con) { |
1528 | return con->scratchpad && !con->workspace; | 1528 | return con->scratchpad && !con->workspace; |
1529 | } | 1529 | } |
1530 | |||
1531 | bool container_is_scratchpad_hidden_or_child(struct sway_container *con) { | ||
1532 | while (con->parent) { | ||
1533 | con = con->parent; | ||
1534 | } | ||
1535 | return con->scratchpad && !con->workspace; | ||
1536 | } | ||