X-Git-Url: http://git.osdn.net/view?p=jnethack%2Fsource.git;a=blobdiff_plain;f=win%2FX11%2Fwinmesg.c;h=10919be116e96fd6c561054f067e2cb15e52ebd3;hp=fd958f83dd2ac69fff3d6687918d068db719d39a;hb=a8de0574c7ab742da03c764f846216c8766abb58;hpb=2756735525fc11994a3e01c6bc699af110707533 diff --git a/win/X11/winmesg.c b/win/X11/winmesg.c index fd958f8..10919be 100644 --- a/win/X11/winmesg.c +++ b/win/X11/winmesg.c @@ -539,13 +539,18 @@ struct xwindow *wp; mesg_info->char_lbearing, mesg_info->char_ascent + y_base, curr->line, curr->str_length); #else + /* GCを使い回さずにコピーしたものを使う */ + GC gc = XCreateGC(XtDisplay(wp->w), XtWindow(wp->w), 0, NULL ); + XtGCMask mask = GCFunction | GCForeground | GCBackground | GCFont; + XCopyGC(XtDisplay(wp->w), mesg_info->gc, mask, gc); XmbDrawString(XtDisplay(wp->w), XtWindow(wp->w), mesg_info->fontset, - mesg_info->gc, + gc, mesg_info->char_lbearing, mesg_info->char_ascent + y_base, curr->line, curr->str_length); + XFreeGC(XtDisplay(wp->w), gc); #endif /* * This draws a line at the _top_ of the line of text pointed to by