wmii

git clone git://oldgit.suckless.org/wmii/
Log | Files | Refs | README | LICENSE

commit 9643981f3c13b70ffd3326269d97d6a395b4b180
parent 102ca03cb841ec4f5b6901763ebcaf04c039f33c
Author: Anselm R. Garbe <garbeam@wmii.de>
Date:   Thu, 27 Apr 2006 10:10:39 +0200

added debug info


Diffstat:
cmd/wm/client.c | 5++++-
cmd/wm/column.c | 7+++++++
cmd/wm/view.c | 39++++++++++++++-------------------------
rc/wmiirc | 2+-
4 files changed, 26 insertions(+), 27 deletions(-)

diff --git a/cmd/wm/client.c b/cmd/wm/client.c @@ -460,6 +460,7 @@ resize_client(Client *c, XRectangle *r, Bool ignore_xcall) Frame *f = c->frame.data[c->sel]; f->rect = *r; + fprintf(stderr, "resize_client >>> f[%d]=%x (%s)\n", c->sel, f, f->area->view->name); if((f->area->mode != Colstack) || (f->area->sel == idx_of_frame(f))) match_sizehints(c); @@ -632,8 +633,10 @@ resize_all_clients() if(c->frame.size && c->frame.data[c->sel]->area) { if(idx_of_area(c->frame.data[c->sel]->area)) resize_column(c, &c->frame.data[c->sel]->rect, nil); - else + else { resize_client(c, &c->frame.data[c->sel]->rect, False); + fprintf(stderr, "resize_client: %s", "client.c:638\n"); + } } } flush_events(EnterWindowMask); diff --git a/cmd/wm/column.c b/cmd/wm/column.c @@ -63,6 +63,7 @@ relax_column(Area *a) Frame *f = a->frame.data[i]; f->rect.x = a->rect.x + (a->rect.width - f->rect.width) / 2; f->rect.y = a->rect.y + (a->rect.height - f->rect.height) / 2; + fprintf(stderr, "resize_client: %s", "column.c:66 (relax_column fallthrough)\n"); resize_client(f->client, &f->rect, False); } return; @@ -88,6 +89,7 @@ relax_column(Area *a) Frame *f = a->frame.data[i]; unsigned int tmp = f->rect.height; f->rect.height += hx; + fprintf(stderr, "resize_client: %s", "column.c:92 (relaxation)\n"); resize_client(f->client, &f->rect, True); hdiff -= (f->rect.height - tmp); } @@ -103,6 +105,7 @@ relax_column(Area *a) f->rect.y = yoff; if(a->mode != Colmax) yoff = f->rect.y + f->rect.height + hdiff; + fprintf(stderr, "resize_client: %s", "column.c:108 (offsets)\n"); resize_client(f->client, &f->rect, False); } } @@ -157,6 +160,7 @@ arrange_column(Area *a, Bool dirty) if(i == a->frame.size - 1) f->rect.height = a->rect.height - yoff; yoff += f->rect.height; + fprintf(stderr, "resize_client: %s", "column.c:164 (arrange_column)\n"); resize_client(f->client, &f->rect, True); } break; @@ -173,6 +177,7 @@ arrange_column(Area *a, Bool dirty) else f->rect.height = height_of_bar(); yoff += f->rect.height; + fprintf(stderr, "resize_client: %s", "column.c:180 (arrange_column)\n"); resize_client(f->client, &f->rect, True); } break; @@ -181,6 +186,7 @@ Fallthrough: for(i = 0; i < a->frame.size; i++) { Frame *f = a->frame.data[i]; f->rect = a->rect; + fprintf(stderr, "resize_client: %s", "column.c:189 (arrange_column)\n"); resize_client(f->client, &f->rect, True); } break; @@ -200,6 +206,7 @@ match_horiz(Area *a, XRectangle *r) Frame *f = a->frame.data[i]; f->rect.x = r->x; f->rect.width = r->width; + fprintf(stderr, "resize_client: %s", "column.c:209 (match_horiz)\n"); resize_client(f->client, &f->rect, False); } } diff --git a/cmd/wm/view.c b/cmd/wm/view.c @@ -95,8 +95,10 @@ focus_view(View *v) Frame *f = client.data[i]->frame.data[client.data[i]->sel]; if(f->area->view == v) { XMoveWindow(dpy, client.data[i]->framewin, f->rect.x, f->rect.y); - if(client.data[i]->frame.size > 1) + if(client.data[i]->frame.size > 1) { + fprintf(stderr, "resize_client: %s", "view.c:425 (focus_view)\n"); resize_client(client.data[i], &f->rect, False); + } draw_client(client.data[i]); } else @@ -370,39 +372,26 @@ update_views() update_client_views(client.data[i]); /* *-tag size isse occures in the next loop */ + fprintf(stderr, "%s\n", "--------------"); for(i = 0; i < client.size; i++) { Client *c = client.data[i]; for(j = 0; j < view.size; j++) { + Frame *f = c->frame.size ? c->frame.data[c->sel] : nil; + if(f) + fprintf(stderr, ">>> f[%d]=%x %s %d %d %d %d\n", + c->sel, f, c->tags, f->rect.x, f->rect.y, f->rect.width, f->rect.height); if(is_view_of(c, view.data[j]) || strchr(c->tags, '*')) { - if(!is_of_view(view.data[j], c)) { - unsigned int tmp = c->sel; - Frame *f = c->frame.size ? c->frame.data[c->sel] : nil; - if(f) - fprintf(stderr, "ABf=%x %s %d %d %d %d\n", - f, c->tags, f->rect.x, f->rect.y, f->rect.width, f->rect.height); - + if(!is_of_view(view.data[j], c)) attach_to_view(view.data[j], c); - - c->sel = tmp; - f = c->frame.data[c->sel]; - fprintf(stderr, "AEf=%x %s %d %d %d %d\n", - f, c->tags, f->rect.x, f->rect.y, f->rect.width, f->rect.height); - } } else { - if(is_of_view(view.data[j], c)) { - Frame *f = c->frame.data[c->sel]; - fprintf(stderr, "DBf=%x %s %d %d %d %d\n", - f, c->tags, f->rect.x, f->rect.y, f->rect.width, f->rect.height); - + if(is_of_view(view.data[j], c)) detach_from_view(view.data[j], c); - - f = c->frame.size ? c->frame.data[c->sel] : nil; - if(f) - fprintf(stderr, "DEf=%x %s %d %d %d %d\n", - f, c->tags, f->rect.x, f->rect.y, f->rect.width, f->rect.height); - } } + f = c->frame.size ? c->frame.data[c->sel] : nil; + if(f) + fprintf(stderr, "<<< f[%d]=%x %s %d %d %d %d\n", + c->sel, f, c->tags, f->rect.x, f->rect.y, f->rect.width, f->rect.height); } } diff --git a/rc/wmiirc b/rc/wmiirc @@ -47,7 +47,7 @@ wmiir write /def/rules <<EOF EOF # MISC -xsetroot -solid '#222222' +xsetroot -solid '#333333' status & PROGS_FILE=/tmp/.wmiimenu.$USER.progs proglist `echo "$PATH" | tr : ' '` >$PROGS_FILE &