On Sun, Mar 25, 2012 at 07:47:36PM +0200, Swiatoslaw Gal wrote: > > You could use the focused window instead (which was what you > > originally asked about): > > > > $ xdotool getwindowfocus > > 48234505 > > Yes, this works fine (without any today's patches). > But the very first answer: XGetInputFocus was _exactly_ > what I was looking for. > > Is there a reason that a _window_manager_ provides EHWHMS... > whatever support? This can be done with an external program, > am I wrong?
The reason why I wrote these patches was that external programs do not work reliably without support from the WM. In particular "xdotool getwindowfocus" is quite frustrating. See also the "xdotool" manpage itself: "getactivewindow: Output the current active window. This command is often more reliable than getwindowfocus." Apart from that I agree with Anselm that EWMH is a pain... Andreas