Hey all, The dwm home page says "dwm doesn’t distinguish between layers: there is no floating or tiled layer." I've never really known what this means, because floating windows *are* stacked above tiling windows. And I find that really, really annoying.
So here are two patches, which implement two possible alternatives. It would be great if we could apply one of them to tip. The first, float-same-level, just takes out the code which differentiates the layers, so all windows are created equal. Floating windows could be behind all other windows. If you're worried floating windows might get lost behind all the tiled ones, the alternative is float-under-focus, where the focused window is above all floating windows, which are in turn above all other tiled windows. This way you're unlikely to lose a floating window, but you don't have a stupid floating window obscuring your view, either. Thanks, cls
diff -r 40bff70c312f dwm.c --- a/dwm.c Tue Nov 15 20:16:58 2011 +0100 +++ b/dwm.c Sat Dec 10 02:56:54 2011 +0100 @@ -1413,24 +1413,12 @@ void restack(Monitor *m) { - Client *c; XEvent ev; - XWindowChanges wc; drawbar(m); if(!m->sel) return; - if(m->sel->isfloating || !m->lt[m->sellt]->arrange) - XRaiseWindow(dpy, m->sel->win); - if(m->lt[m->sellt]->arrange) { - wc.stack_mode = Below; - wc.sibling = m->barwin; - for(c = m->stack; c; c = c->snext) - if(!c->isfloating && ISVISIBLE(c)) { - XConfigureWindow(dpy, c->win, CWSibling|CWStackMode, &wc); - wc.sibling = c->win; - } - } + XRaiseWindow(dpy, m->sel->win); XSync(dpy, False); while(XCheckMaskEvent(dpy, EnterWindowMask, &ev)); } @@ -2117,9 +2105,6 @@ zoom(const Arg *arg) { Client *c = selmon->sel; - if(!selmon->lt[selmon->sellt]->arrange - || (selmon->sel && selmon->sel->isfloating)) - return; if(c == nexttiled(selmon->clients)) if(!c || !(c = nexttiled(c->next))) return;
diff -r 40bff70c312f dwm.c --- a/dwm.c Tue Nov 15 20:16:58 2011 +0100 +++ b/dwm.c Sat Dec 10 03:01:14 2011 +0100 @@ -1420,8 +1420,6 @@ drawbar(m); if(!m->sel) return; - if(m->sel->isfloating || !m->lt[m->sellt]->arrange) - XRaiseWindow(dpy, m->sel->win); if(m->lt[m->sellt]->arrange) { wc.stack_mode = Below; wc.sibling = m->barwin; @@ -1431,6 +1429,7 @@ wc.sibling = c->win; } } + XRaiseWindow(dpy, m->sel->win); XSync(dpy, False); while(XCheckMaskEvent(dpy, EnterWindowMask, &ev)); } @@ -2117,9 +2116,6 @@ zoom(const Arg *arg) { Client *c = selmon->sel; - if(!selmon->lt[selmon->sellt]->arrange - || (selmon->sel && selmon->sel->isfloating)) - return; if(c == nexttiled(selmon->clients)) if(!c || !(c = nexttiled(c->next))) return;