[comp.windows.x] twm/tvtwm NoTitle screws up xterm font change

casey@gauss.llnl.gov (Casey Leedom) (10/05/90)

  If I turn off title bars for xterms via NoTitle in my twmrc, then when I
change fonts in my xterms (control right mouse button) the new window
size is computed incorrectly.  (Try it yourself.  It's impossible to
describe what looks like totally random size computations.)  This problem
occurs with both twm and tvtwm.

  I've struggled through the code and have narrowed the problem down to a
call to XMoveResizeWindow() in twm's SetupWindow() at line 716 in
resize.c.  The problem is in the height parameter
"h-tmp_win->title_height."  The values of "h" are equal to the height of
the window + the height of a title bar (even though the window doesn't
have a title bar.)  The value of "tmp_win->title_height" is 0 because the
window doesn't have a title bar.  I changed the expression to
"h-title_height" ("title_height" is the height of title bars.)  This
corrects the wild size changes that I see when you change fonts in xterm,
but still screws up the height of the window by about the size of a title
bar.

  At this point I'm totally out of answers.  Would someone more capable
than me figure out exactly what needs to be done to fix this problem?
I'd really like to be able to change my font dynamically.

Casey

P.S.  My X sources are patched up to MIT patchlevel 14.