Dirk Wallenstein <[email protected]> writes: > On Sat, May 15, 2010 at 11:41:45PM +0100, Mubarak Aguye wrote: >> Hi. I was wondering if there is a way of determining the title of the >> current active window, and its x-y coordinates from within a C++ >> application, or even a standard Linux shell. > > For the shell, you could use 'xwininfo'. > For C++, you would use XWindowAttributes and Properties. > http://www.x.org/docs/X11/xlib.pdf (Chapter 3) > http://tronche.com/gui/x/xlib/window-information/
And "the currently active window", assuming you mean the window that is currently set up to receive key events from the primary keyboard, is probably the window you get from XGetInputFocus(). (If you mean something else by "currently active window", you'll probably have to ask your window manager somehow.) eirik _______________________________________________ [email protected]: X.Org support Archives: http://lists.freedesktop.org/archives/xorg Info: http://lists.freedesktop.org/mailman/listinfo/xorg
