--- st.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/st.c b/st.c index 097244c..362de23 100644 --- a/st.c +++ b/st.c _AT_@ -2428,6 +2428,7 @@ tputc(char *c, int len) { treset(); term.esc = 0; xresettitle(); + xloadcols(); break; case '=': /* DECPAM -- Application keypad */ term.mode |= MODE_APPKEYPAD; _AT_@ -2589,6 +2590,13 @@ void xloadcols(void) { int i, r, g, b; XRenderColor color = { .alpha = 0xffff }; + static bool loaded; + Colour *cp; + + if(loaded) { + for (cp = dc.col; cp < dc.col + LEN(dc.col); ++cp) + XftColorFree(xw.dpy, xw.vis, xw.cmap, cp); + } /* load colors [0-15] colors and [256-LEN(colorname)[ (config.h) */ for(i = 0; i < LEN(colorname); i++) { _AT_@ -2621,6 +2629,7 @@ xloadcols(void) { die("Could not allocate color %d\n", i); } } + loaded = true; } int -- 1.8.3.2Received on Sat Jul 20 2013 - 23:29:37 CEST
This archive was generated by hypermail 2.3.0 : Sat Jul 20 2013 - 23:36:13 CEST