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:

Index: add_window.c
===================================================================
RCS file: /cvsroot/xsrc/external/mit/ctwm/dist/add_window.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -p -u -r1.3 -r1.4
--- add_window.c        11 Apr 2021 10:11:57 -0000      1.3
+++ add_window.c        12 Apr 2021 06:42:31 -0000      1.4
@@ -1000,7 +1000,7 @@ AddWindow(Window w, AWType wtype, IconMg
                                               tmp_win->name, namelen,
                                               &ink_rect, &logical_rect);
                                width = SIZE_HINDENT + ink_rect.width;
-                               height = logical_rect.height + SIZE_VINDENT * 2;
+                               height = Scr->SizeFont.height + SIZE_VINDENT * 
2;
 
                                XmbTextExtents(Scr->SizeFont.font_set,
                                               ": ", 2,  NULL, &logical_rect);

fixes the problem. logical_rect.height is only the height of the
":" string, which isn't tall enough to display arbitrary characters.

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


Greetings,
-- 
                                Michael van Elst
Internet: mlel...@serpens.de
                                "A potential Snark may lurk in every tree."

Reply via email to