Given a particular window id, could someone provide a brief example of how
to raise the window and grab an image of it?
It's something I've done before using Xlib in C++ but my Python fluency is
Rich Midwinter wrote:
> Given a particular window id, could someone provide a brief example of
> how to raise the window and grab an image of it?
I grabbed a bit of code together from a few other things I'd been
playing with - run an xcalc, then you should be able to grab a image of
it with the code attached. Admittedly it's using the window name
instead of the id, but you can probably figure that bit out :) There's
probably also a bunch of other assumptions in the code (like a
particular screen depth), but hopefully it'll be a guideline.
Attached and at http://pastebin.com/552024