this patch keeps track of global z-layer order of clients which are floating or if floating mode is enabled
d22abeee
1 file(s) · +7 −12
| 12 | 12 | { |
|
| 13 | 13 | Client *c, *min; |
|
| 14 | 14 | ||
| 15 | + | if((clients && clients->isfloat) || arrange == dofloat) |
|
| 16 | + | return clients; /* don't touch floating order */ |
|
| 15 | 17 | for(min = c = clients; c; c = c->next) |
|
| 16 | 18 | if(c->weight < min->weight) |
|
| 17 | 19 | min = c; |
|
| 18 | 20 | return min; |
|
| 19 | - | } |
|
| 20 | - | ||
| 21 | - | 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 | 21 | } |
|
| 30 | 22 | ||
| 31 | 23 | static void |
|
| 232 | 224 | return; |
|
| 233 | 225 | } |
|
| 234 | 226 | if(sel->isfloat || arrange == dofloat) { |
|
| 235 | - | pop(sel); |
|
| 236 | 227 | XRaiseWindow(dpy, sel->win); |
|
| 237 | 228 | XRaiseWindow(dpy, sel->twin); |
|
| 238 | 229 | } |
|
| 307 | 298 | if((c = sel) == nexttiled(clients)) |
|
| 308 | 299 | if(!(c = nexttiled(c->next))) |
|
| 309 | 300 | return; |
|
| 310 | - | pop(c); |
|
| 301 | + | detach(c); |
|
| 302 | + | if(clients) |
|
| 303 | + | clients->prev = c; |
|
| 304 | + | c->next = clients; |
|
| 305 | + | clients = c; |
|
| 311 | 306 | focus(c); |
|
| 312 | 307 | arrange(NULL); |
|
| 313 | 308 | } |
|