Re: XForms: windows list

Steve Lamont (spl@szechuan.ucsd.edu)
Wed, 18 Nov 98 06:32:18 PST

# To subscribers of the xforms list from spl@szechuan.ucsd.edu (Steve Lamont) :

> is there a simple way to get a list of all the windows opened in my
> application ? (using Xlib or Xforms...)

Unfortunately, none of which I'm aware. XForms, of course, keeps
track of this information internally but it's kept in a static array
and not globally available [TC -- there probably should be a call
fl_get_form_list() or something to that effect].

As far as I know, Xlib doesn't maintain any such correspondence --
top level Windows are created more or less independently from one
another.

You might be able to use XQueryTree() to grovel down from the root
Window and test every Window on the screen but that would be quite
ugly and prone to error (say, for instance, you have two copies of the
same application running for some reason -- it would be difficult to
differentiate between their Windows).

I finally came to the conclusion when faced with the same problem that
the best thing to do was to perform the bookkeeping myself.

spl

_________________________________________________
To unsubscribe, send the message "unsubscribe" to
xforms-request@bob.usuf2.usuhs.mil or see
http://bob.usuf2.usuhs.mil/mailserv/xforms.html
XForms Home Page: http://bragg.phys.uwm.edu/xforms
List Archive: http://bob.usuf2.usuhs.mil/mailserv/list-archives/