diff options
| author | Anselm R. Garbe <arg@10kloc.org> | 2006-09-06 17:31:52 +0200 |
|---|---|---|
| committer | Anselm R. Garbe <arg@10kloc.org> | 2006-09-06 17:31:52 +0200 |
| commit | d22abeee867397c366f69cf89524b94e01c2e0e2 (patch) | |
| tree | 85e2334cb1ad5e94fe1083da6a38d4eeb9af5eef | |
| parent | no this is better (diff) | |
| download | dwm-d22abeee867397c366f69cf89524b94e01c2e0e2.tar.gz dwm-d22abeee867397c366f69cf89524b94e01c2e0e2.zip | |
this patch keeps track of global z-layer order of clients which are floating or if floating mode is enabled
| -rw-r--r-- | view.c | 19 |
1 files changed, 7 insertions, 12 deletions
| @@ -12,6 +12,8 @@ minclient() | |||
| 12 | { | 12 | { |
| 13 | Client *c, *min; | 13 | Client *c, *min; |
| 14 | 14 | ||
| 15 | if((clients && clients->isfloat) || arrange == dofloat) | ||
| 16 | return clients; /* don't touch floating order */ | ||
| 15 | for(min = c = clients; c; c = c->next) | 17 | for(min = c = clients; c; c = c->next) |
| 16 | if(c->weight < min->weight) | 18 | if(c->weight < min->weight) |
| 17 | min = c; | 19 | min = c; |
| @@ -19,16 +21,6 @@ minclient() | |||
| 19 | } | 21 | } |
| 20 | 22 | ||
| 21 | static void | 23 | static void |
| 22 | pop(Client *c) | ||
| 23 | { | ||
| 24 | detach(c); | ||
| 25 | if(clients) | ||
| 26 | clients->prev = c; | ||
| 27 | c->next = clients; | ||
| 28 | clients = c; | ||
| 29 | } | ||
| 30 | |||
| 31 | static void | ||
| 32 | reorder() | 24 | reorder() |
| 33 | { | 25 | { |
| 34 | Client *c, *newclients, *tail; | 26 | Client *c, *newclients, *tail; |
| @@ -232,7 +224,6 @@ restack() | |||
| 232 | return; | 224 | return; |
| 233 | } | 225 | } |
| 234 | if(sel->isfloat || arrange == dofloat) { | 226 | if(sel->isfloat || arrange == dofloat) { |
| 235 | pop(sel); | ||
| 236 | XRaiseWindow(dpy, sel->win); | 227 | XRaiseWindow(dpy, sel->win); |
| 237 | XRaiseWindow(dpy, sel->twin); | 228 | XRaiseWindow(dpy, sel->twin); |
| 238 | } | 229 | } |
| @@ -307,7 +298,11 @@ zoom(Arg *arg) | |||
| 307 | if((c = sel) == nexttiled(clients)) | 298 | if((c = sel) == nexttiled(clients)) |
| 308 | if(!(c = nexttiled(c->next))) | 299 | if(!(c = nexttiled(c->next))) |
| 309 | return; | 300 | return; |
| 310 | pop(c); | 301 | detach(c); |
| 302 | if(clients) | ||
| 303 | clients->prev = c; | ||
| 304 | c->next = clients; | ||
| 305 | clients = c; | ||
| 311 | focus(c); | 306 | focus(c); |
| 312 | arrange(NULL); | 307 | arrange(NULL); |
| 313 | } | 308 | } |
