diff options
| -rw-r--r-- | client.c | 9 | ||||
| -rw-r--r-- | tag.c | 9 |
2 files changed, 10 insertions, 8 deletions
| @@ -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; |
| @@ -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 | ||
| 117 | void | 116 | void |
| @@ -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 | } |
