mirror of
https://github.com/mintycube/st.git
synced 2024-10-22 14:05:49 +02:00
Add alpha to background color from escape sequence
This commit is contained in:
parent
08f137a8a0
commit
ec513b230a
10
x.c
10
x.c
@ -813,6 +813,16 @@ xsetcolorname(int x, const char *name)
|
|||||||
XftColorFree(xw.dpy, xw.vis, xw.cmap, &dc.col[x]);
|
XftColorFree(xw.dpy, xw.vis, xw.cmap, &dc.col[x]);
|
||||||
dc.col[x] = ncolor;
|
dc.col[x] = ncolor;
|
||||||
|
|
||||||
|
#if ALPHA_PATCH
|
||||||
|
/* set alpha value of bg color */
|
||||||
|
if (x == defaultbg) {
|
||||||
|
if (opt_alpha)
|
||||||
|
alpha = strtof(opt_alpha, NULL);
|
||||||
|
dc.col[defaultbg].color.alpha = (unsigned short)(0xffff * alpha);
|
||||||
|
dc.col[defaultbg].pixel &= 0x00FFFFFF;
|
||||||
|
dc.col[defaultbg].pixel |= (unsigned char)(0xff * alpha) << 24;
|
||||||
|
}
|
||||||
|
#endif // ALPHA_PATCH
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user