Re: [iPAQ] toplevel windows, xlsclients and xwininfo

From: Julius P. Malkiewicz <julius.a.t.sonartech.com.au>
Date: Wed Apr 17 2002 - 22:25:17 EDT

On Wed, Apr 17, 2002 at 06:00:02PM -0700, Mark G. Saye wrote:
> Hi,
>
> I'm trying to write a task manager (in Tcl, not that it matters much for
> this question). Is there some way of getting the window IDs and names
> (as seen by the window manager) of all the toplevel windows (or at least
> ones that should be seen in a task manager)? I'd like to be able to do
> this in a fairly portable way, using a similar mechanism on the iPAQ and
> on the desktop (Linux only). I've tried using 'xlsclients -l' but it
> only returns one ID for each application - no good for Netscape (for
> instance) which has multiple windows. Also 'xwininfo -tree -root' will
> return everything, but then how do I know which window IDs refer to
> toplevel windows? I've also heard of the 'xlswins' command, but I don't
> have it and can't find it anywhere - is it still used?

Have you looked into "xlsclients"? comes as part of the xaux-clients ipkg
Perhaps that's what you mean by "xlswins". Otherwise writing a small C
app is easy (can post some code if you'd like :) .. but it's basically a
call to XQueryTree(3) ... ).

  Note that tcl/tk can also query this kind of stuff, but it's cumbersome,
and there are issues to do with whether you want to poll the display for
it's windows, or just to be notified when a new windows created ... (but the
former is much more complicated ...).

  - Julius.
Received on Thu Apr 18 02:25:23 2002

This archive was generated by hypermail 2.1.8 : Tue May 04 2004 - 09:44:46 EDT