[dwm] Rearrange clients in stack.

From: Rickard Gustafsson <rickard_AT_allyourbase.se>
Date: Wed, 30 May 2007 23:43:32 +0200

I'm fiddling with a function that makes it possible to rearrang the
clients in the stack. My efforts so far has been pretty unsuccessfully.
My thought was that one should be able change places between the
selected client with the client above or belowe.

My first thougth was that I just had to use the resize function and
exchange the y-possition of the both clients and use the layout arrange
function. But it didn't work out, so I tried without lt-arrange(), and
shure the clients exchanged positons but as son ls-arrange() was called
they were back in the same old place. But it also make dwm segfault some

So I guess that I have to change the order of the clients in some other
way. Any proposals?

Here is also the function I tried with:

tilemove(int y) {
    Client *c;
    int sy, cy;

    if(lt->arrange == floating) /* If floating layout there is nothing to do */

    if(y < 0)
        do {
            c = sel->prev;
        } while(!isvisible(c) || c->isfloating);
        do {
            c = sel->next;
        } while(!isvisible(c) || c->isfloating);

    sy = sel->y;
    cy = c->y;

    resize(c, c->x, sy, c->w, c->h, True);
    resize(sel, sel->x, cy, sel->w, sel->h, True);
Received on Wed May 30 2007 - 23:43:33 UTC

This archive was generated by hypermail 2.2.0 : Sun Jul 13 2008 - 14:43:19 UTC