Re: Window Information tool
Graeme Geldenhuys wrote:[color=blue]
> Is something like this possible in X-Window? It's would be similar to
> 'xwininfo' (command line app), but with runtime updates. I did find a
> GTK2 version of 'xwininfo' which seems to do what I want, but it doesn't
> draw the all important rectangle highlighting the window in question.[/color]
Just as a follow up. I have managed to implement this under X11 and it
was much easier than I expected. Thanks to hordes of available
open-source out there. :-)
I simply grab the mouse pointer and poll it's position every xxx
milliseconds. I then use a recursive XQueryPointer() call to track down
the exact (top most) window under the cursor. Query the information
about that window, translate the coordinates and use the "rubber band"
technique to draw directly on the root (desktop) window highlighting the
window in question.
Next step will be to extend the information I display about the window.
Name, classname, events it listens to etc... But I find the
highlighting rectangle very useful - especially since I am a GUI toolkit
- Graeme -
fpGUI - a cross-platform GUI toolkit using Free Pascal