wmii

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

commit 0a144ff452a2586ddce39f78d155896d9d83f9d8
parent be6228859677ec17e5607b4ec502e6604f13128b
Author: Anselm R. Garbe <garbeam@wmii.de>
Date:   Sun,  5 Mar 2006 00:14:12 +0100

removed revert crap


Diffstat:
cmd/wm/client.c | 9---------
cmd/wm/tag.c | 17+----------------
cmd/wm/wm.h | 3---
3 files changed, 1 insertion(+), 28 deletions(-)

diff --git a/cmd/wm/client.c b/cmd/wm/client.c @@ -100,8 +100,6 @@ focus_client(Client *c) c->area->tag->sel = i; c->area->sel = client2index(c); if(old && (old != c)) { - if(old->area == c->area) - c->revert = old; grab_mouse(old->win, AnyModifier, Button1); draw_client(old); } @@ -375,11 +373,6 @@ detach_client(Client *c, Bool unmap) { Area *a = c->area; if(a) { - unsigned int i; - for(i = 0; i < nclient; i++) - if(client[i]->revert == c) - client[i]->revert = nil; - if(!c->destroyed) { if(!unmap) unmap_client(c); @@ -391,8 +384,6 @@ detach_client(Client *c, Bool unmap) detach_fromarea(c); } c->area = nil; - if(c->revert) - focus_client(c->revert); if(c->destroyed) destroy_client(c); } diff --git a/cmd/wm/tag.c b/cmd/wm/tag.c @@ -31,8 +31,6 @@ char * destroy_tag(Tag *t) { unsigned int i; - Tag *old = t->revert; - Client *c; for(i = 0; i < t->narea; i++) if(t->area[i]->nclient) @@ -44,21 +42,11 @@ destroy_tag(Tag *t) cext_array_detach((void **)tag, t, &tagsz); ntag--; - for(i = 0; i < ntag; i++) { - if(tag[i]->revert == t) - tag[i]->revert = nil; + for(i = 0; i < ntag; i++) XChangeProperty(dpy, root, net_atom[NetNumWS], XA_CARDINAL, 32, PropModeReplace, (unsigned char *) &i, 1); - } free(t); - if(ntag && old) { - focus_tag(old); - if((c = sel_client_of_tag(old))) - focus_client(c); - } - else - write_event("PN -\n"); return nil; } @@ -75,7 +63,6 @@ tag2index(Tag *t) void focus_tag(Tag *t) { - Tag *old = tag ? tag[sel] : nil; char buf[16]; Client *c; int i, pi = tag2index(t); @@ -84,8 +71,6 @@ focus_tag(Tag *t) if(!ntag || (pi == -1)) return; - if(old && old != t) - t->revert = old; sel = pi; px = sel * rect.width; /* gives all(!) clients proper geometry (for use of different tagrs) */ diff --git a/cmd/wm/wm.h b/cmd/wm/wm.h @@ -87,7 +87,6 @@ struct Tag { unsigned int areasz; unsigned int narea; unsigned int sel; - Tag *revert; }; struct Client { @@ -101,11 +100,9 @@ struct Client { Window trans; XRectangle rect; XSizeHints size; - Client *revert; struct Frame { Window win; XRectangle rect; - XRectangle revert; GC gc; Cursor cursor; } frame;