summaryrefslogtreecommitdiffstats
path: root/layout.c
diff options
context:
space:
mode:
authornicm <nicm>2018-01-12 10:16:03 +0000
committernicm <nicm>2018-01-12 10:16:03 +0000
commit829fe38ab1429671044a428a2760a9746a73bff6 (patch)
tree7acd65fda840ce4831b317051720589a16159616 /layout.c
parentd17c90583a2cbbb15ec1a357380b0985e6472a5f (diff)
Improve logging for layout cells.
Diffstat (limited to 'layout.c')
-rw-r--r--layout.c19
1 files changed, 17 insertions, 2 deletions
diff --git a/layout.c b/layout.c
index 2c6fe2b2..4ccd6d79 100644
--- a/layout.c
+++ b/layout.c
@@ -97,9 +97,24 @@ void
layout_print_cell(struct layout_cell *lc, const char *hdr, u_int n)
{
struct layout_cell *lcchild;
+ const char *type;
- log_debug("%s:%*s%p type %u [parent %p] wp=%p [%u,%u %ux%u]", hdr, n,
- " ", lc, lc->type, lc->parent, lc->wp, lc->xoff, lc->yoff, lc->sx,
+ switch (lc->type) {
+ case LAYOUT_LEFTRIGHT:
+ type = "LEFTRIGHT";
+ break;
+ case LAYOUT_TOPBOTTOM:
+ type = "TOPBOTTOM";
+ break;
+ case LAYOUT_WINDOWPANE:
+ type = "WINDOWPANE";
+ break;
+ default:
+ type = "UNKNOWN";
+ break;
+ }
+ log_debug("%s:%*s%p type %s [parent %p] wp=%p [%u,%u %ux%u]", hdr, n,
+ " ", lc, type, lc->parent, lc->wp, lc->xoff, lc->yoff, lc->sx,
lc->sy);
switch (lc->type) {
case LAYOUT_LEFTRIGHT: