Re: [dev] [dwm] about _NET_ACTIVE_WINDOW support

From: Andreas Amann <amann_AT_physik.tu-berlin.de>
Date: Sun, 8 Jan 2012 02:03:22 +0100

On Sat, Jan 07, 2012 at 10:20:27PM +0200, Ivan Kanakarakis wrote:
> dwm, when it receives a _NET_ACTIVE_WINDOW message, it transfers focus to
> the client that asked for it, but never sets the root window id to that
> window's id. That is ofcourse a choice - the standard doesn't force one to
> do that, but that makes tools like xdotool and xprop fail on some options
> that people may find usefull. Specifically the following commands:
>
> $ xprop -root _NET_ACTIVE_WINDOW
> $ xdotool getactivewindow
>
> To get those working properly, one would need to,
>
> XChangeProperty(dpy, root, netatom[NetActiveWindow], XA_WINDOW, 32,
> PropModeReplace, (unsigned char *)&c->win, 1);
>
> everytime a new window is focused. I guess that would go into
> setfocus(Client *c) function or something similar.

I use the attached patch for this. In addition it also maintains a
NetClientList, which exposes the list of managed windows in the ewmh
recommended way.

Andreas

Received on Sun Jan 08 2012 - 02:03:22 CET

This archive was generated by hypermail 2.3.0 : Sun Jan 08 2012 - 02:12:03 CET