(Whoops, forgot to include [EMAIL PROTECTED] in the CC: field so
I'm sending this again.)

On Mon, Mar 07, 2005 at 08:02:42PM -0600, Marcelo E. Magallon wrote:
>  Current CVS seems to still have the problem.  I'll review the diff you
>  point out to see if something else in there causes the drawing problem.

I think this happens because WMBoldSystemFontOfSize() returns WMFont*
but tech_draw_font is actually declared to be of type XFontStruct* in
screen.h:

    XFontStruct *tech_draw_font;       /* font for tech draw style geom view
                                          needs to be a core font so we can
                                          use it with a XORing GC */

Since upstream hasn't responded yet (I noticed you forwarded a copy
there) I suggest the following fix. It's as non-intrusive as possible
and affects wmaker's behavior only in the case where the font is not
found and wmaker would otherwise segfault when it tries to use the
font. I don't see the drawing problem with this patch applied
regardless of whether I have the missing font or not.

--- screen.c.orig       Thu May  5 17:43:15 2005
+++ screen.c    Thu May  5 18:27:07 2005
@@ -808,6 +808,8 @@
     scr->info_text_font = WMBoldSystemFontOfSize(scr->wmscreen, 12);

     scr->tech_draw_font= XLoadQueryFont(dpy, 
"-adobe-helvetica-bold-r-*-*-12-*-*-*-*-*-*-*");
+    if (scr->tech_draw_font == NULL) /* fallback to a more common font */
+        scr->tech_draw_font = XLoadQueryFont(dpy, "fixed");

     scr->gview = WCreateGeometryView(scr->wmscreen);
     WMRealizeWidget(scr->gview);

Is it already too late to get this into sarge? It'd be really
unfortunate if sarge had a wmaker package that segfaults when there's
one font missing :( (I think the font is in the package gsfonts-x11).


best regards,
Timo Lindfors

Attachment: pgpRzY8nbl7ys.pgp
Description: PGP signature

Reply via email to