diff options
author | taiyu <taiyu.len@gmail.com> | 2018-03-28 12:48:01 -0700 |
---|---|---|
committer | taiyu <taiyu.len@gmail.com> | 2018-03-28 12:48:01 -0700 |
commit | e4e8b66efdade7f8beb75beea9f527f74a07529a (patch) | |
tree | a8a0a09e79ff6e5282a5b7e04b9247aa1f1647f5 | |
parent | 52b9a62b31f1bcd97bb30044c38b85cd554b56d0 (diff) | |
download | sway-e4e8b66efdade7f8beb75beea9f527f74a07529a.zip sway-e4e8b66efdade7f8beb75beea9f527f74a07529a.tar.gz sway-e4e8b66efdade7f8beb75beea9f527f74a07529a.tar.bz2 |
Clean up scratchpad logging
-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 5cc5f9d..166c41e 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); + } } } |