summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnselm R. Garbe <arg@10kloc.org>2006-09-06 15:30:28 +0200
committerAnselm R. Garbe <arg@10kloc.org>2006-09-06 15:30:28 +0200
commitfd00b3a18620c70721c4c4d9f0169e06b9ce4437 (patch)
tree8d7bac8a49663a2bfd119ad51a996498f4c2bdfc
parentmaybe this might work (diff)
downloaddwm-fd00b3a18620c70721c4c4d9f0169e06b9ce4437.tar.gz
dwm-fd00b3a18620c70721c4c4d9f0169e06b9ce4437.zip
does this preserve z order for anthony?
Diffstat (limited to '')
-rw-r--r--client.c9
-rw-r--r--tag.c9
2 files changed, 10 insertions, 8 deletions
diff --git a/client.c b/client.c
index cac848e..45cb3a3 100644
--- a/client.c
+++ b/client.c
@@ -99,6 +99,13 @@ focus(Client *c)
99 } 99 }
100 } 100 }
101 if(c) { 101 if(c) {
102 if(c->isfloat || arrange == dofloat) {
103 detach(c);
104 if(clients)
105 clients->prev = c;
106 c->next = clients;
107 clients = c;
108 }
102 grabbuttons(c, True); 109 grabbuttons(c, True);
103 drawtitle(c); 110 drawtitle(c);
104 XSetInputFocus(dpy, c->win, RevertToPointerRoot, CurrentTime); 111 XSetInputFocus(dpy, c->win, RevertToPointerRoot, CurrentTime);
@@ -243,8 +250,6 @@ manage(Window w, XWindowAttributes *wa)
243 c->isfloat = trans 250 c->isfloat = trans
244 || (c->maxw && c->minw && 251 || (c->maxw && c->minw &&
245 c->maxw == c->minw && c->maxh == c->minh); 252 c->maxw == c->minw && c->maxh == c->minh);
246 if(c->isfloat)
247 c->weight = ntags;
248 253
249 if(clients) 254 if(clients)
250 clients->prev = c; 255 clients->prev = c;
diff --git a/tag.c b/tag.c
index b0c4d14..fafc2c5 100644
--- a/tag.c
+++ b/tag.c
@@ -110,8 +110,7 @@ settags(Client *c, Client *trans)
110 if(!matched) 110 if(!matched)
111 for(i = 0; i < ntags; i++) 111 for(i = 0; i < ntags; i++)
112 c->tags[i] = seltag[i]; 112 c->tags[i] = seltag[i];
113 if(!c->isfloat) 113 for(c->weight = 0; c->weight < ntags && !c->tags[c->weight]; c->weight++);
114 for(c->weight = 0; c->weight < ntags && !c->tags[c->weight]; c->weight++);
115} 114}
116 115
117void 116void
@@ -125,8 +124,7 @@ tag(Arg *arg)
125 for(i = 0; i < ntags; i++) 124 for(i = 0; i < ntags; i++)
126 sel->tags[i] = False; 125 sel->tags[i] = False;
127 sel->tags[arg->i] = True; 126 sel->tags[arg->i] = True;
128 if(!sel->isfloat) 127 sel->weight = arg->i;
129 sel->weight = arg->i;
130 arrange(NULL); 128 arrange(NULL);
131} 129}
132 130
@@ -142,7 +140,6 @@ toggletag(Arg *arg)
142 for(i = 0; i < ntags && !sel->tags[i]; i++); 140 for(i = 0; i < ntags && !sel->tags[i]; i++);
143 if(i == ntags) 141 if(i == ntags)
144 sel->tags[arg->i] = True; 142 sel->tags[arg->i] = True;
145 if(!sel->isfloat) 143 sel->weight = (i == ntags) ? arg->i : i;
146 sel->weight = (i == ntags) ? arg->i : i;
147 arrange(NULL); 144 arrange(NULL);
148} 145}