summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorarg@10ksloc.org <unknown>2006-08-01 11:49:19 +0200
committerarg@10ksloc.org <unknown>2006-08-01 11:49:19 +0200
commit937cabfa0aad7eef6d25e9d142a478163de200c5 (patch)
tree1f0751ad821d2fe283513781d0e7be003a1472d1
parentupdated html (diff)
downloaddwm-937cabfa0aad7eef6d25e9d142a478163de200c5.tar.gz
dwm-937cabfa0aad7eef6d25e9d142a478163de200c5.zip
committed a patch which fixes the hints of Jukka
-rw-r--r--client.c42
-rw-r--r--draw.c2
-rw-r--r--dwm.h2
-rw-r--r--tag.c8
4 files changed, 14 insertions, 40 deletions
diff --git a/client.c b/client.c
index c20c517..45acf2e 100644
--- a/client.c
+++ b/client.c
@@ -73,8 +73,8 @@ focusnext(Arg *arg)
73 if(sel->ismax) 73 if(sel->ismax)
74 togglemax(NULL); 74 togglemax(NULL);
75 75
76 if(!(c = getnext(sel->next, tsel))) 76 if(!(c = getnext(sel->next)))
77 c = getnext(clients, tsel); 77 c = getnext(clients);
78 if(c) { 78 if(c) {
79 higher(c); 79 higher(c);
80 focus(c); 80 focus(c);
@@ -260,36 +260,10 @@ manage(Window w, XWindowAttributes *wa)
260 arrange(NULL); 260 arrange(NULL);
261 261
262 /* mapping the window now prevents flicker */ 262 /* mapping the window now prevents flicker */
263 if(c->tags[tsel]) { 263 XMapRaised(dpy, c->win);
264 XMapRaised(dpy, c->win); 264 XMapRaised(dpy, c->title);
265 XMapRaised(dpy, c->title); 265 if(c->tags[tsel])
266 focus(c); 266 focus(c);
267 }
268 else {
269 XMapRaised(dpy, c->win);
270 XMapRaised(dpy, c->title);
271
272 }
273}
274
275void
276pop(Client *c)
277{
278 Client **l;
279
280 for(l = &clients; *l && *l != c; l = &(*l)->next);
281 if(c->prev)
282 c->prev->next = c->next;
283 if(c->next)
284 c->next->prev = c->prev;
285 *l = c->next;
286
287 c->prev = NULL;
288 if(clients)
289 clients->prev = c;
290 c->next = clients;
291 clients = c;
292 arrange(NULL);
293} 267}
294 268
295void 269void
@@ -457,7 +431,7 @@ unmanage(Client *c)
457 c->next->prev = c->prev; 431 c->next->prev = c->prev;
458 *l = c->next; 432 *l = c->next;
459 if(sel == c) { 433 if(sel == c) {
460 sel = getnext(c->next, tsel); 434 sel = getnext(c->next);
461 if(!sel) 435 if(!sel)
462 sel = getprev(c->prev); 436 sel = getprev(c->prev);
463 if(!sel) 437 if(!sel)
@@ -481,8 +455,8 @@ zoom(Arg *arg)
481 if(!sel) 455 if(!sel)
482 return; 456 return;
483 457
484 if(sel == getnext(clients, tsel) && sel->next) { 458 if(sel == getnext(clients) && sel->next) {
485 if((c = getnext(sel->next, tsel))) 459 if((c = getnext(sel->next)))
486 sel = c; 460 sel = c;
487 } 461 }
488 462
diff --git a/draw.c b/draw.c
index 0c920e5..4f8594c 100644
--- a/draw.c
+++ b/draw.c
@@ -99,7 +99,7 @@ drawall()
99{ 99{
100 Client *c; 100 Client *c;
101 101
102 for(c = clients; c; c = getnext(c->next, tsel)) 102 for(c = clients; c; c = getnext(c->next))
103 drawtitle(c); 103 drawtitle(c);
104 drawstatus(); 104 drawstatus();
105} 105}
diff --git a/dwm.h b/dwm.h
index a6a04ca..d18ef20 100644
--- a/dwm.h
+++ b/dwm.h
@@ -133,7 +133,7 @@ extern int xerror(Display *dsply, XErrorEvent *ee);
133extern void appendtag(Arg *arg); 133extern void appendtag(Arg *arg);
134extern void dofloat(Arg *arg); 134extern void dofloat(Arg *arg);
135extern void dotile(Arg *arg); 135extern void dotile(Arg *arg);
136extern Client *getnext(Client *c, unsigned int t); 136extern Client *getnext(Client *c);
137extern Client *getprev(Client *c); 137extern Client *getprev(Client *c);
138extern void replacetag(Arg *arg); 138extern void replacetag(Arg *arg);
139extern void settags(Client *c); 139extern void settags(Client *c);
diff --git a/tag.c b/tag.c
index 67e2498..13e22af 100644
--- a/tag.c
+++ b/tag.c
@@ -63,7 +63,7 @@ dofloat(Arg *arg)
63 ban(c); 63 ban(c);
64 } 64 }
65 if(sel && !sel->tags[tsel]) { 65 if(sel && !sel->tags[tsel]) {
66 if((sel = getnext(clients, tsel))) { 66 if((sel = getnext(clients))) {
67 higher(sel); 67 higher(sel);
68 focus(sel); 68 focus(sel);
69 } 69 }
@@ -126,7 +126,7 @@ dotile(Arg *arg)
126 ban(c); 126 ban(c);
127 } 127 }
128 if(!sel || (sel && !sel->tags[tsel])) { 128 if(!sel || (sel && !sel->tags[tsel])) {
129 if((sel = getnext(clients, tsel))) { 129 if((sel = getnext(clients))) {
130 higher(sel); 130 higher(sel);
131 focus(sel); 131 focus(sel);
132 } 132 }
@@ -135,9 +135,9 @@ dotile(Arg *arg)
135} 135}
136 136
137Client * 137Client *
138getnext(Client *c, unsigned int t) 138getnext(Client *c)
139{ 139{
140 for(; c && !c->tags[t]; c = c->next); 140 for(; c && !c->tags[tsel]; c = c->next);
141 return c; 141 return c;
142} 142}
143 143