Re: [dev] xid of a current window

From: Andreas Amann <amann_AT_physik.tu-berlin.de>
Date: Sun, 25 Mar 2012 21:10:21 +0200

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
Received on Sun Mar 25 2012 - 21:10:21 CEST

This archive was generated by hypermail 2.3.0 : Sun Mar 25 2012 - 21:12:03 CEST