Re: [dwm] Monocle patch for dwm-4.2

From: Anydot <dfenze_AT_gmail.com>
Date: Sat, 2 Jun 2007 23:55:38 +0200

On (02/06/07 22:51), Szabolcs Nagy wrote:
> XLowerWindow is called for every tiled win at every lt->arrange() call
> which moves the window back in the X window stack
>
> this is not a problem for other tiled layouts or when only one window
> is visible, but when we have more windows all the hidden windows got
> an Expose event which causes annoying blinking
>
> eg it occures whenever a popup dialog appears or disappears
>
> solutions: ban() the invisible windows or don't call restack (it may
> cause problems with floating windows but i don't use many)
>
> btw i like this layout very much, it can be used as togglemax for tiled windows
>

I know this problem for a long time, but this is not easily solvable. If
every windows which is visible&&!focused && !floating is banned too,
the focus() MUST be changed too, to unban focused window, this is imho
the best solution. Other solution is not calling restack() and do some
sort of Inteligent Restack (TM) :DD but hey, this will render monocle()
to be not only the layout manager ;(. I'm thinking about both solutions
for some time but i don't have much spare time to solve it, maybe in
next ~2 weeks ;).

But if we do feel of mouse focus of floating windows same as keyboard
focus - mouse focused floating window will be on top (so, in enternotify
after calling focus(c) there will be restack() too), some sort of
incrementaly restacking can be done, and the whole restack() can be
thrown away. There are only few actions which change stack order:
enternotify+keyboard focus change, managing of new window,
resizing/moving with window. Instead of this, there will be
restackfocused() called on the changed/added client
this can look like this:

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));
}

So, if that thinkg with mouse focusing is acceptable (and why not? there
will be then same behaviour while focusing with keyboard or mouse) then
this can be simplification and speedup too. (and it will solve blinking
windows in monocle layout too ;D).

So arg, is THIS acceptable to you?

PS: sorry for that longthy letter ;)

-- 
	Premysl "Anydot" Hruby >> http://na.srck.net <<
Received on Sat Jun 02 2007 - 23:55:46 UTC

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