wmii

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

commit ec111a5c9d8aa82c15f04441b8869292e73e8d61
parent 41ebe974c987cd9e05744d6f81f6914220bb1657
Author: Anselm R. Garbe <garbeam@wmii.de>
Date:   Fri, 28 Apr 2006 12:37:19 +0200

revised occurences of draw_client.*, should be more robust now (though urxvt is broken if run with -tr, not our problem)


Diffstat:
TODO.wmii-4 | 9+++++++++
cmd/wm/area.c | 3+--
cmd/wm/client.c | 17++++++++++-------
cmd/wm/fs.c | 4+---
cmd/wm/rule.c | 5++---
cmd/wm/view.c | 6+++---
cmd/wm/wmiiwm.1 | 2--
7 files changed, 26 insertions(+), 20 deletions(-)

diff --git a/TODO.wmii-4 b/TODO.wmii-4 @@ -11,3 +11,12 @@ - partly EWMH support - libixp: idea from PoP: implement a va_args method similiar to printf for marshalling 9P messages, might reduce LOC drastically + +We also thought already about simplifying the mode concept of +columns, but with a quite different approach. What you describe +is already possible in default mode (even through writing to + geom files, though I plan to remove the geom syntax as it is now + (with the +- stuff, and only allowing explicit coordinates, + instead additionally resize +/-<w> +/-<h> and move +/-<x> +/-<y> + actions are needed in the associated ctl devices of clients. + diff --git a/cmd/wm/area.c b/cmd/wm/area.c @@ -144,8 +144,7 @@ select_area(Area *a, char *arg) if(new->frame.size) focus_client(new->frame.data[new->sel]->client, True); v->sel = i; - for(i = 0; i < a->frame.size; i++) - draw_client(a->frame.data[i]->client); + draw_clients(); } void diff --git a/cmd/wm/client.c b/cmd/wm/client.c @@ -122,8 +122,6 @@ focus_client(Client *c, Bool restack) v->sel = i; f->area->sel = idx_of_frame(f); - if(old) - draw_client(old); if(restack) restack_view(v); else { @@ -135,7 +133,10 @@ focus_client(Client *c, Bool restack) if(i > 0 && f->area->mode == Colstack) arrange_column(f->area, False); XSetInputFocus(dpy, c->win, RevertToPointerRoot, CurrentTime); + if(old) + draw_client(old); draw_client(c); + XSync(dpy, False); snprintf(buf, sizeof(buf), "ClientFocus %d\n", idx_of_client_id(c->id)); write_event(buf); } @@ -384,6 +385,7 @@ manage_client(Client *c) update_views(); map_client(c); XMapWindow(dpy, c->framewin); + XSync(dpy, False); if(c->frame.data[c->sel]->area->view == view.data[sel]) focus_client(c, False); flush_events(EnterWindowMask); @@ -698,10 +700,11 @@ client_of_win(Window w) void draw_clients() { - unsigned int i, j; - for(i = 0; i < client.size; i++) - for(j = 0; j < client.data[i]->frame.size; j++) - if(client.data[i]->frame.data[j]->area->view == view.data[sel]) - draw_client(client.data[i]); + unsigned int i; + for(i = 0; i < client.size; i++) { + Client *c = client.data[i]; + if(c->frame.size && (c->frame.data[c->sel]->area->view == view.data[sel])) + draw_client(c); + } } diff --git a/cmd/wm/fs.c b/cmd/wm/fs.c @@ -1464,9 +1464,7 @@ xwrite(IXPConn *c, Fcall *fcall) if(m->qid.dir_type == FsDarea) { view.data[i1]->area.data[i2]->mode = i; arrange_column(view.data[i1]->area.data[i2], True); - if(view.data[i1]->area.data[i2]->frame.size == 1) /* little hack to update the tagbar */ - draw_client(view.data[i1]->area.data[i2] - ->frame.data[view.data[i1]->area.data[i2]->sel]->client); + draw_clients(); } else def.colmode = i; diff --git a/cmd/wm/rule.c b/cmd/wm/rule.c @@ -30,6 +30,8 @@ typedef struct { } Rule; VECTOR(RuleVector, Rule *); +VECTOR(PropVector, char *); + static RuleVector rule; static Vector * @@ -38,8 +40,6 @@ vector_of_rules(RuleVector *rv) return (Vector *) rv; } -VECTOR(PropVector, char *); - static Vector * vector_of_props(PropVector *pv) { @@ -134,7 +134,6 @@ update_rules() update_views(); } - static void match(Client *c, PropVector prop) { diff --git a/cmd/wm/view.c b/cmd/wm/view.c @@ -88,20 +88,20 @@ focus_view(View *v) update_frame_selectors(v); /* gives all(!) clients proper geometry (for use of different tags) */ - if((c = sel_client_of_view(v))) - focus_client(c, True); for(i = 0; i < client.size; i++) if(client.data[i]->frame.size) { 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); resize_client(client.data[i], &f->rect, False); - draw_client(client.data[i]); } else XMoveWindow(dpy, client.data[i]->framewin, 2 * rect.width + f->rect.x, f->rect.y); } + if((c = sel_client_of_view(v))) + focus_client(c, True); + draw_clients(); update_view_bars(); XSync(dpy, False); XUngrabServer(dpy); diff --git a/cmd/wm/wmiiwm.1 b/cmd/wm/wmiiwm.1 @@ -5,9 +5,7 @@ wmiiwm \- window manager improved 2 (core) .B wmiiwm .RB \-a .IR <address> -.br .RB [ \-c ] -.br .RB [ \-v ] .SH DESCRIPTION .SS Overview