summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorEamon Walsh <ewalsh@tycho.nsa.gov>2011-07-26 14:11:31 -0400
committerEamon Walsh <ewalsh@tycho.nsa.gov>2011-07-26 14:11:31 -0400
commitfc77370068e45b7fa6e4eb67bdaf3a4c17478b2c (patch)
treee05d7937c39b4661378013dc757ce34a65ea8a72 /src
parent5d713ff6ef60fe8885d497d67e2c67604dd55831 (diff)
Pretty-printing improvements to view_debug_dump output.
Diffstat (limited to 'src')
-rw-r--r--src/view.c27
1 files changed, 21 insertions, 6 deletions
diff --git a/src/view.c b/src/view.c
index 20b7475..5f584dd 100644
--- a/src/view.c
+++ b/src/view.c
@@ -443,27 +443,42 @@ view_debug_dump(void)
{
struct view *v;
+ fprintf(stderr, "------ BEGIN VIEW DUMP\n");
+
TAILQ_FOREACH(v, &all_views, view_next) {
- fprintf(stderr, "View: %p Client: %d Buffer: %d ID: %x\n\tFlags: %x\n\t"
- "Buffer Position: %d,%d %dx%d\n\tScreen Position: %d,%d %dx%d\n\t"
+ if (v->flags & VIEW_FLAGS_THUMBNAIL)
+ continue;
+
+ fprintf(stderr, "View: %p Client: %d Buffer: %d ID: %x\n\t"
+ "Flags: %s%s%s\n\tBuffer Position: %d,%d %dx%d\n\t"
+ "Screen Position: %d,%d %dx%d\n\t"
"Thumbnail Position: %d,%d %dx%d\n\t"
"Mapped: %d Visible: %d Opacity: %d\n",
- v, v->client->id, v->buffer->id, v->id, v->flags,
+ v, v->client->id, v->buffer->id, v->id,
+ v->flags & VIEW_FLAGS_CLIENT ? "CLIENT " : "",
+ v->flags & VIEW_FLAGS_BACKGROUND ? "BG " : "",
+ v->flags & VIEW_FLAGS_THUMBNAIL ? "THUMB " : "",
v->bpos.x, v->bpos.y, v->bpos.w, v->bpos.h,
v->spos.x, v->spos.y, v->spos.w, v->spos.h,
v->tpos.x, v->tpos.y, v->tpos.w, v->tpos.h,
v->mapped, v->visible, v->opacity);
if (v->thumb)
- fprintf(stderr, "\tThumbnail: %p Client: %d Buffer: %d ID: %x\n\tFlags: %x\n\t"
- "Buffer Position: %d,%d %dx%d\n\tScreen Position: %d,%d %dx%d\n\t"
+ fprintf(stderr, "\tThumbnail: %p Client: %d Buffer: %d ID: %x\n\t\t"
+ "Flags: %s%s%s\n\t\tBuffer Position: %d,%d %dx%d\n\t\t"
+ "Screen Position: %d,%d %dx%d\n\t\t"
"Mapped: %d Visible: %d Opacity: %d\n\n",
- v->thumb, v->thumb->client->id, v->thumb->buffer->id, v->thumb->id, v->thumb->flags,
+ v->thumb, v->thumb->client->id, v->thumb->buffer->id, v->thumb->id,
+ v->thumb->flags & VIEW_FLAGS_CLIENT ? "CLIENT " : "",
+ v->thumb->flags & VIEW_FLAGS_BACKGROUND ? "BG " : "",
+ v->thumb->flags & VIEW_FLAGS_THUMBNAIL ? "THUMB " : "",
v->thumb->bpos.x, v->thumb->bpos.y, v->thumb->bpos.w, v->thumb->bpos.h,
v->thumb->spos.x, v->thumb->spos.y, v->thumb->spos.w, v->thumb->spos.h,
v->thumb->mapped, v->thumb->visible, v->thumb->opacity);
else
fprintf(stderr, "\n");
}
+
+ fprintf(stderr, "------ END VIEW DUMP\n");
}