On Mon, Sep 04, 2006 at 05:18:17PM +0200, Sander van Dijk wrote:
> On 9/4/06, Anselm R. Garbe <arg_AT_10kloc.org> wrote:
> >Actually that is a suboptimal fix. I pushed a different solution
> >which uses the knowledge, that arrange() calls restack()
> >already. The described problem occured because 'sel' may
> >point to a different (the previously selected client) until
> >the focus() is called in the end, this results in a wrong Z
> >layer order when arrange() calls restack().
> >
> >--- a/client.c Mon Sep 4 12:23:41 2006 +0200
> >+++ b/client.c Mon Sep 4 17:02:13 2006 +0200
> >@@ -254,6 +254,8 @@ manage(Window w, XWindowAttributes *wa)
> > clients = c;
> >
> > settitle(c);
> >+ if(isvisible(c))
> >+ sel = c;
> > arrange(NULL);
> > XMapWindow(dpy, c->win);
> > XMapWindow(dpy, c->twin);
>
> No, that's the way it was (I removed that part in my patch), and it
> leads to another problem: besides focusing the new client, focus()
> also makes sure that the previous client is cleanly unfocused (correct
> buttongrab etc.). Changing sel from outside focus() leads to the
> former selected client having incorrect buttongrabs. This could be
> fixed by doing something like:
>
> if(isvisible(c)) {
> focus(NULL);
> sel = c;
> }
>
> for instance, or by manually grabbing the right buttons for the old
> focused client. Not sure what the right way is (calling focus on c
> itself at that point is probably not an option, since that would
> incorrectly map its twin afterwards).
Your last remark seems best for now.
Included in dwm-1.3.
Regards,
-- Anselm R. Garbe ><>< www.ebrag.de ><>< GPG key: 0D73F361Received on Mon Sep 04 2006 - 17:23:46 UTC
This archive was generated by hypermail 2.2.0 : Sun Jul 13 2008 - 14:30:52 UTC