On Wed 14 Apr 2021 at 17:38:05 +0200, Michael van Elst wrote:
> Hello,
> (c)twm opens a small window showing title and geometry when placing
> a window, moving or resizing it.
> I noticed that the first case displays the text truncated at the bottom
> when using a larger ResizeFont like:
>   ResizeFont "-misc-fixed-medium-r-*-*-*-200-*-*-*-*-iso10646-1"
> The Resize window is sized correctly for the move and resize case.
> The window height calculation in add_window.c differs from those
> done in functions_win_moveresize.c and win_resize.c. Aligning
> the code in add_window.c like:

That is from 4.0.3 I guess. I just see that there is a new branch in the
NetBSD repository; you're importing the 4.0.3 release? I like it!

In any case it is good to have the same size calculations here, but (at
least with the current trunk code) I can't readily reproduce it. Maybe
my font or window titles are not conspiring to show the problem.

If I read the code correctly, the XmbTextExtents() call (just above the
context of the diff) is applied to the window title, so more than just
": ", which comes below (at the end of the context). Maybe if the digits
are taller than the tallest letter in the window title I would expect a

Unicode fonts often have quite large vertical sizes, because they often
contain non-ASCII glypghs that are much taller than ASCII text. In some
places in ctwm there is a mitigation to avoid ugly layout from that
effect. I guess for this little window that doesn't seem to be a problem
(yet, anyway).

Anyway, I'm ok with this change (but I don't make the final decision),
in the context of using the same sizing method in all comparable places.

> I don't know if or how you accept patches, but if you think this
> is correct, feel free to use it.

Sending patches here is perfectly fine.

>                                 Michael van Elst

___ Q: "What's an anagram of Banach-Tarski?"  -- Olaf "Rhialto" Seibert
\X/ A: "Banach-Tarski Banach-Tarski."         -- rhialto at falu dot nl

Attachment: signature.asc
Description: PGP signature

Reply via email to