> 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? s.