[comp.sys.hp] Traversing a X11 window tree

chris@bwilab3.UUCP (Chris Curtin) (09/22/90)

Hi,
  I am looking for a way to figure out the window id of an xterm or hpterm
window. What I would like to do is XLIB graphics in the hpterm window or
create a child window with the hpterm as its parent window.

  I have used xwininfo to observe the window tree, but am not sure how to
traverse the tree, or really how to know when I have found the window tree
of the hpterm.

  I am running Motif window manager and using hpterm, but information about
how to do it with an xterm would be very helpful.

Thanks in advance.

Chris Curtin

 ..uunet!gatech!galbp!bwilab3!chris 

stroyan@hpfcso.HP.COM (Mike Stroyan) (09/25/90)

>  I am looking for a way to figure out the window id of an xterm or hpterm
>window. What I would like to do is XLIB graphics in the hpterm window or
>create a child window with the hpterm as its parent window.
>
>Chris Curtin

Both xterm and hpterm set the environment variable WINDOWID to a decimal
window id for the top level window of terminal emulator.  From
experimentation I have noted that hpterm actually creates a child window
which it does rendering in.  To do Xlib graphics, you will want to
create your own child of the $WINDOWID window.  That way you won't be
fighting with hpterm over repainting for output and expose events.  You
could map and unmap your child to switch between graphics and text.  It
is very hard to combine your graphics and hpterm's text and show both
in the same area at the same time.  It can't really be done well.

Mike Stroyan, mike_stroyan@fc.hp.com