fixed the open bug reported by Sander, (after approx. 12h debugging I finally got this beast)

This commit is contained in:
Anselm R. Garbe 2006-04-27 11:22:20 +02:00
parent 9643981f3c
commit 61962d4d03
4 changed files with 5 additions and 32 deletions

View File

@ -3,7 +3,6 @@
* See LICENSE file for license details.
*/
#include <assert.h>
#include <stdlib.h>
#include <string.h>
#include <X11/Xatom.h>
@ -227,7 +226,6 @@ prop_client(Client *c, XPropertyEvent *e)
}
}
/* speed reasoned function for client property change */
void
draw_client(Client *c)
{
@ -460,7 +458,6 @@ 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);
@ -633,10 +630,8 @@ 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);

View File

@ -63,7 +63,6 @@ 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;
@ -89,7 +88,6 @@ 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);
}
@ -105,7 +103,6 @@ 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);
}
}
@ -160,7 +157,6 @@ 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;
@ -177,7 +173,6 @@ 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;
@ -186,7 +181,6 @@ 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;
@ -206,7 +200,6 @@ 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);
}
}

View File

@ -3,7 +3,6 @@
* See LICENSE file for license details.
*/
#include <assert.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
@ -311,7 +310,6 @@ name2type(char *name, unsigned char dir_type)
if(err)
return -1;
dyndir:
/*fprintf(stderr, "nametotype: dir_type = %d\n", dir_type);*/
switch(dir_type) {
case FsDbars: return FsDbar; break;
case FsDview: return FsDarea; break;
@ -653,10 +651,8 @@ xwalk(IXPConn *c, Fcall *fcall)
for(nwqid = 0; (nwqid < fcall->nwname)
&& !mkqid(&dir, fcall->wname[nwqid], &fcall->wqid[nwqid]); nwqid++)
dir = fcall->wqid[nwqid];
if(!nwqid) {
fprintf(stderr, "xwalk: no such file '%s'\n", fcall->wname[nwqid]);
if(!nwqid)
return Enofile;
}
}
/* a fid will only be valid, if the walk was complete */
if(nwqid == fcall->nwname) {
@ -1520,7 +1516,6 @@ do_fcall(IXPConn *c)
char *errstr;
if((msize = ixp_server_receive_fcall(c, &fcall))) {
/*fprintf(stderr, "do_fcall=%d\n", fcall.id);*/
switch(fcall.id) {
case TVERSION: errstr = xversion(c, &fcall); break;
case TATTACH: errstr = xattach(c, &fcall); break;

View File

@ -95,10 +95,8 @@ 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) {
fprintf(stderr, "resize_client: %s", "view.c:425 (focus_view)\n");
if(client.data[i]->frame.size > 1)
resize_client(client.data[i], &f->rect, False);
}
draw_client(client.data[i]);
}
else
@ -227,6 +225,8 @@ attach_to_view(View *v, Client *c)
else
a = v->area.data[v->sel];
update_frame_selectors(v);
attach_to_area(a, c);
v->sel = idx_of_area(a);
map_client(c);
@ -371,15 +371,9 @@ update_views()
for(i = 0; i < client.size; i++)
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))
attach_to_view(view.data[j], c);
@ -388,10 +382,6 @@ update_views()
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, "<<< 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);
}
}