jkh@meepmeep.pcs.COM (Jordan K. Hubbard) (10/12/90)
Ok, I'm stumped. Actually, we are stumped ("we" being the emu project folks here at PCS). What we have is the following: A composite widget, called the xterm+ widget, containing one or more of the following children: ----------------------------------------------------------------- | menu bar | ----------------------------------------------------------------- | | | | | | | | | | | | | | | |s| | |c| | |r| | |o| TermCanvas widget | |l| | |l| | |b| | |a| | |r| | | | | | | | | | | | | | | | | ----------------------------------------------------------------- As far as screen geometry goes, the xterm+ widget is always as big as the termCanvas widget plus an optional scrollbar and/or menubar. In the typical case where the xterm+ widget is the sole child of a shell widget and the termCanvas the sole child of it, the termCanvas first reads its geometry from the resource database and decides that it wants to be (for example) 80x24 characters wide and asks its parent (the xterm+ widget) for this size. Fine. The xterm+ widget grants the request by making itself suitably bigger (and then resizing the termCanvas). The next step, before the shell is mapped, is to ask the termCanvas what its "cell size" is (basically the font height and width) and set these as the widthInc and heightInc hints on the shell widget. The shell widget is mapped, the size is reported by the window manager correctly (with the correct sizing increments) and All Is Great. The problem occurs when we add a scrollbar or menu bar, since the xterm+ widget is now bigger than just the termCanvas. The size increments should stay the same, since we're naturally interested in being sized in character increments, but the window manager's idea of _how many_ characters big we are is all hosed up. How can I get the WM to somehow subtract a given number of pixels from the width and/or height of the shell widget before calculating the sizes? Sorry if this explanation is a little verbose, but I didn't know how else to describe the problen. Jordan