From e4e8b66efdade7f8beb75beea9f527f74a07529a Mon Sep 17 00:00:00 2001 From: taiyu Date: Wed, 28 Mar 2018 12:48:01 -0700 Subject: Clean up scratchpad logging --- sway/debug_log.c | 8 ++++---- 1 file 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); + } } } -- cgit v1.2.3