How can I get accurate window information in Linux? I know that I can use wmctrl
to get a window's size, but the actual size of the window can vary due to window decorations. I need the following information and methods:
What would be the best way to do this? I am interested in working with Python so something with a python module would be preferred.
Thanks in advance!
The best way is to use X11/xlib directly (Documentation: http://tronche.com/gui/x/xlib/ )
Beginning from the Root you can walk through a tree via XQueryTree() and get the window Attributes via XGetWindowAttributes () / XGetGeometry ().
Ok, this is a C-Library, but there is also a Python Port: http://python-xlib.sourceforge.net/?page=documentation