diff options
| -rw-r--r-- | sway/debug_log.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sway/debug_log.c b/sway/debug_log.c index 5cc5f9dc..166c41e8 100644 --- a/sway/debug_log.c +++ b/sway/debug_log.c @@ -71,11 +71,11 @@ void layout_log(const swayc_t *c, int depth) { layout_log(c->floating->items[i], depth + 1); } } - } - if (c->type == C_ROOT) { - fprintf(stderr,"ScratchPad\n"); - for (int i = 0; i < scratchpad->length; ++i) + } else if (c->type == C_ROOT && scratchpad->length > 0) { + fprintf(stderr, "ScratchPad\n"); + for (i = 0; i < scratchpad->length; ++i) { container_log(scratchpad->items[i], 0); + } } } |
