I know this problem for a long time, but this is not easily solvable. If
ok i didn't think much about the problem previously

sort of Inteligent Restack (TM) :DD but hey, this will render monocle()
yes probably restack should be rethinked because sometimes it is
called unnecessaryly in lt->arrange() (togglebar, inc(n)master(w),
zoom, configurenotify, ..).

restackfocused()
{
        XEvent ev;

        drawstatus(); /* Maybe not needed? */
        if(!sel)
                return;
        if(sel->isfloating || lt->arrange == floating)
                XRaiseWindow(dpy, sel->win);
        else
                XLowerWindow(dpy, sel->win);
        XSync(dpy, False);
        while(XCheckMaskEvent(dpy, EnterWindowMask,     &ev));
}
it looks ok, but if the focused tiled window is lowered then that's
still not good for monocle (or fullscreen as it's called in my src)
may be XRestackWindows[1] can be used to place the tiled window
exactly where we want (below the floating layer but on top of the
tiled windows)
or we can call a full restack when a tiled window appears and do
nothing with it in restackfocused()
well it still needs some thinking (it would be easier if the X window
stack could be manipulated more straightforwardly)

[1]: http://tronche.com/gui/x/xlib/window/XRestackWindows.html

Reply via email to