diff options
Diffstat (limited to '')
| -rw-r--r-- | client.c | 16 |
1 files changed, 4 insertions, 12 deletions
| @@ -230,13 +230,7 @@ manage(Window w, XWindowAttributes *wa) | |||
| 230 | DefaultVisual(dpy, screen), | 230 | DefaultVisual(dpy, screen), |
| 231 | CWOverrideRedirect | CWBackPixmap | CWEventMask, &twa); | 231 | CWOverrideRedirect | CWBackPixmap | CWEventMask, &twa); |
| 232 | 232 | ||
| 233 | if(clients) | ||
| 234 | clients->prev = c; | ||
| 235 | c->next = clients; | ||
| 236 | clients = c; | ||
| 237 | |||
| 238 | grabbuttons(c, False); | 233 | grabbuttons(c, False); |
| 239 | |||
| 240 | if((tc = getclient(trans))) /* inherit tags */ | 234 | if((tc = getclient(trans))) /* inherit tags */ |
| 241 | for(i = 0; i < ntags; i++) | 235 | for(i = 0; i < ntags; i++) |
| 242 | c->tags[i] = tc->tags[i]; | 236 | c->tags[i] = tc->tags[i]; |
| @@ -246,6 +240,9 @@ manage(Window w, XWindowAttributes *wa) | |||
| 246 | c->isfloat = trans | 240 | c->isfloat = trans |
| 247 | || (c->maxw && c->minw && | 241 | || (c->maxw && c->minw && |
| 248 | c->maxw == c->minw && c->maxh == c->minh); | 242 | c->maxw == c->minw && c->maxh == c->minh); |
| 243 | |||
| 244 | attach(c); | ||
| 245 | |||
| 249 | settitle(c); | 246 | settitle(c); |
| 250 | if(isvisible(c)) | 247 | if(isvisible(c)) |
| 251 | sel = c; | 248 | sel = c; |
| @@ -407,12 +404,7 @@ unmanage(Client *c) | |||
| 407 | XUngrabButton(dpy, AnyButton, AnyModifier, c->win); | 404 | XUngrabButton(dpy, AnyButton, AnyModifier, c->win); |
| 408 | XDestroyWindow(dpy, c->twin); | 405 | XDestroyWindow(dpy, c->twin); |
| 409 | 406 | ||
| 410 | if(c->prev) | 407 | detach(c); |
| 411 | c->prev->next = c->next; | ||
| 412 | if(c->next) | ||
| 413 | c->next->prev = c->prev; | ||
| 414 | if(c == clients) | ||
| 415 | clients = c->next; | ||
| 416 | if(sel == c) { | 408 | if(sel == c) { |
| 417 | if(trans && (tc = getclient(trans)) && isvisible(tc)) | 409 | if(trans && (tc = getclient(trans)) && isvisible(tc)) |
| 418 | sel = tc; | 410 | sel = tc; |
