wmii

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

commit 3cb5c834c0f68c3e2975e2d596e92a85c12a7f66
parent 1d61ace2642af29705843e17f5e038509ee8eace
Author: Anselm R. Garbe <garbeam@wmii.de>
Date:   Tue,  9 May 2006 12:37:13 +0200

keyboard and new client attachments are made now right after the focused client, several client drawing fixes (to prevent funny artefacts)


Diffstat:
cmd/wm/client.c | 6++++++
cmd/wm/frame.c | 10++++++++--
2 files changed, 14 insertions(+), 2 deletions(-)

diff --git a/cmd/wm/client.c b/cmd/wm/client.c @@ -292,6 +292,8 @@ draw_client(Client *c) /* if */ !idx_of_area(f->area) ? "~" : "", fidx + 1, f->area->frame.size); w = d.rect.width = d.rect.height + blitz_textwidth(dpy, &blitzfont, buf); + if(w > f->rect.width) + return; d.rect.x = f->rect.width - d.rect.width; d.data = buf; @@ -310,6 +312,8 @@ draw_client(Client *c) /* tag bar */ d.rect.width = d.rect.height + blitz_textwidth(dpy, &blitzfont, c->tags); + if(d.rect.width + w > f->rect.width) + return; if(d.rect.width > f->rect.width / 3) d.rect.width = f->rect.width / 3; d.data = c->tags; @@ -319,6 +323,8 @@ draw_client(Client *c) /* title bar */ d.align = WEST; + if(d.rect.x + w > f->rect.width) + return; d.rect.width = f->rect.width - (d.rect.x + w); d.data = c->name; blitz_drawlabel(dpy, &d); diff --git a/cmd/wm/frame.c b/cmd/wm/frame.c @@ -27,8 +27,14 @@ create_frame(Area *a, Client *c) f->rect.height += def.border + height_of_bar(); cext_vattach(vector_of_frames(&c->frame), f); c->sel = c->frame.size - 1; - cext_vattach(vector_of_frames(&a->frame),f); - a->sel = a->frame.size - 1; + if(a->frame.size) { + insert_after_idx(&a->frame, f, a->sel); + a->sel++; + } + else { + cext_vattach(vector_of_frames(&a->frame), f); + a->sel = 0; + } return f; }