Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Path: utzoo!mnetor!uunet!seismo!ut-sally!husc6!think!ames!sdcsvax!ucbvax!ATHENA.MIT.EDU!swick
From: swick@ATHENA.MIT.EDU (Ralph R. Swick)
Newsgroups: comp.windows.x
Subject: Re: Window sizes
Message-ID: <8707151503.AA05147@LYRE.MIT.EDU>
Date: Wed, 15-Jul-87 11:03:44 EDT
Article-I.D.: LYRE.8707151503.AA05147
Posted: Wed Jul 15 11:03:44 1987
Date-Received: Fri, 17-Jul-87 06:22:13 EDT
References: <3239@cit-vax.Caltech.Edu>
Sender: daemon@ucbvax.BERKELEY.EDU
Distribution: world
Organization: The ARPA Internet
Lines: 15

>     Is it possible for a program running in an xterm or hpterm (I
> think hpterm is only in the HP X distribution) window to query the
> window for its size?

On systems that support SIGWINCH, you should use the standard os mechanisms,
as xterm reports the proper thing to the os.

Without SIGWINCH, you'll need to know the window id (to do the Xlib query
for the window geometry) and the font id (to do the Xlib query for character
width and height) and then you can do the computation to get rows/columns.

xterm/10.4 sets the WINDOWID environment variable, but doesn't tell you
the font it's been asked to use.

-Ralph