+ fixed scx_XftColorAllocName
This commit is contained in:
parent
ada7af2ab3
commit
1b11d5d07c
12
c/libs/xft.c
12
c/libs/xft.c
|
@ -171,6 +171,7 @@ s48_value scx_XftFontOpenName(s48_value sdpy, s48_value sscreenno, s48_value sna
|
|||
S48_GC_PROTECT_3(sdpy, sscreenno, sname);
|
||||
xf = XftFontOpenName(scx_extract_display(sdpy), s48_extract_integer(sscreenno),
|
||||
s48_extract_string(sname));
|
||||
XftPatternPrint(xf->pattern);
|
||||
S48_GC_UNPROTECT();
|
||||
return scx_enter_xftfont(xf);
|
||||
}
|
||||
|
@ -402,14 +403,15 @@ s48_value scx_XftColorAllocName(s48_value sdpy, s48_value svisual,
|
|||
s48_value scolormap, s48_value sname)
|
||||
{
|
||||
s48_value res = S48_FALSE;
|
||||
XftColor *xftcolor = NULL;
|
||||
Bool b;
|
||||
XftColor *xftcolor;
|
||||
Bool b = False;
|
||||
S48_DECLARE_GC_PROTECT(5);
|
||||
|
||||
S48_GC_PROTECT_5(res, sdpy, svisual, scolormap, sname);
|
||||
b = XftColorAllocName(scx_extract_display(sdpy), scx_extract_visual(svisual),
|
||||
scx_extract_colormap(scolormap), s48_extract_string(sname),
|
||||
xftcolor);
|
||||
if ((xftcolor = (XftColor *) calloc(1, sizeof(XftColor))) != NULL)
|
||||
b = XftColorAllocName(scx_extract_display(sdpy), scx_extract_visual(svisual),
|
||||
scx_extract_colormap(scolormap), s48_extract_string(sname),
|
||||
xftcolor);
|
||||
res = s48_list_2(b ? S48_TRUE : S48_FALSE,
|
||||
b ? scx_enter_xftcolor(xftcolor) : S48_FALSE);
|
||||
S48_GC_UNPROTECT();
|
||||
|
|
Loading…
Reference in New Issue