The basic functionality of such a project is relatively pedestrian, if you make some gross assumptions. Problems that will complicate matters:
- What about applications using an X server on another host?
- What about applications whose windows are not fully in a visible state (on a different virtual desktop, for instance)?
- What about applications that use GUIs not based on X?
A lot of the heavy lifting can be done with
xwd, as already pointed out. There are also some existing tools to aid in tracking down X clients:
xlsclients,
xwininfo,
xdpyinfo and possibly some other standard X tools. Some of these,
xlsclients in specific, seem to not work as advertised in all settings.
--- rod.