Xinqi Bao's Git
projects
/
dwm.git
/ diff
summary
|
log
|
commit
|
diff
|
tree
raw
|
patch
|
inline
| side by side (parent:
78f4b51
)
fififif
author
arg@mig29 <unknown>
Wed, 22 Nov 2006 15:17:50 +0000
(16:17 +0100)
committer
arg@mig29 <unknown>
Wed, 22 Nov 2006 15:17:50 +0000
(16:17 +0100)
dwm.h
diff
|
blob
|
history
tag.c
diff
|
blob
|
history
view.c
diff
|
blob
|
history
diff --git
a/dwm.h
b/dwm.h
index
37151f9
..
18672d0
100644
(file)
--- a/
dwm.h
+++ b/
dwm.h
@@
-82,7
+82,7
@@
struct Client {
int basew, baseh, incw, inch, maxw, maxh, minw, minh;
int grav;
long flags;
int basew, baseh, incw, inch, maxw, maxh, minw, minh;
int grav;
long flags;
- unsigned int border
, weight
;
+ unsigned int border;
Bool isfloat, isfixed, ismax;
Bool *tags;
Client *next;
Bool isfloat, isfixed, ismax;
Bool *tags;
Client *next;
diff --git
a/tag.c
b/tag.c
index
798fd0a
..
fd08853
100644
(file)
--- a/
tag.c
+++ b/
tag.c
@@
-104,7
+104,6
@@
settags(Client *c, Client *trans) {
if(!matched)
for(i = 0; i < ntags; i++)
c->tags[i] = seltag[i];
if(!matched)
for(i = 0; i < ntags; i++)
c->tags[i] = seltag[i];
- for(c->weight = 0; c->weight < ntags && !c->tags[c->weight]; c->weight++);
}
void
}
void
@@
-116,7
+115,6
@@
tag(Arg *arg) {
for(i = 0; i < ntags; i++)
sel->tags[i] = False;
sel->tags[arg->i] = True;
for(i = 0; i < ntags; i++)
sel->tags[i] = False;
sel->tags[arg->i] = True;
- sel->weight = arg->i;
arrange();
}
arrange();
}
@@
-130,6
+128,5
@@
toggletag(Arg *arg) {
for(i = 0; i < ntags && !sel->tags[i]; i++);
if(i == ntags)
sel->tags[arg->i] = True;
for(i = 0; i < ntags && !sel->tags[i]; i++);
if(i == ntags)
sel->tags[arg->i] = True;
- sel->weight = (i == ntags) ? arg->i : i;
arrange();
}
arrange();
}
diff --git
a/view.c
b/view.c
index
bd43da9
..
e7d7a99
100644
(file)
--- a/
view.c
+++ b/
view.c
@@
-5,42
+5,12
@@
/* static */
/* static */
-static Client *
-minclient(void) {
- Client *c, *min;
-
- if((clients && clients->isfloat) || arrange == dofloat)
- return clients; /* don't touch floating order */
- for(min = c = clients; c; c = c->next)
- if(c->weight < min->weight)
- min = c;
- return min;
-}
-
static Client *
nexttiled(Client *c) {
for(c = getnext(c); c && c->isfloat; c = getnext(c->next));
return c;
}
static Client *
nexttiled(Client *c) {
for(c = getnext(c); c && c->isfloat; c = getnext(c->next));
return c;
}
-static void
-reorder(void) {
- Client *c, *newclients, *tail;
-
- newclients = tail = NULL;
- while((c = minclient())) {
- detach(c);
- if(tail) {
- c->prev = tail;
- tail->next = c;
- tail = c;
- }
- else
- tail = newclients = c;
- }
- clients = newclients;
-}
-
static void
togglemax(Client *c) {
XEvent ev;
static void
togglemax(Client *c) {
XEvent ev;
@@
-247,7
+217,6
@@
toggleview(Arg *arg) {
for(i = 0; i < ntags && !seltag[i]; i++);
if(i == ntags)
seltag[arg->i] = True; /* cannot toggle last view */
for(i = 0; i < ntags && !seltag[i]; i++);
if(i == ntags)
seltag[arg->i] = True; /* cannot toggle last view */
- reorder();
arrange();
}
arrange();
}
@@
-258,7
+227,6
@@
view(Arg *arg) {
for(i = 0; i < ntags; i++)
seltag[i] = False;
seltag[arg->i] = True;
for(i = 0; i < ntags; i++)
seltag[i] = False;
seltag[arg->i] = True;
- reorder();
arrange();
}
arrange();
}
@@
-268,7
+236,6
@@
viewall(Arg *arg) {
for(i = 0; i < ntags; i++)
seltag[i] = True;
for(i = 0; i < ntags; i++)
seltag[i] = True;
- reorder();
arrange();
}
arrange();
}