aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--st.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/st.c b/st.c
index 097244c..362de23 100644
--- a/st.c
+++ b/st.c
@@ -2428,6 +2428,7 @@ tputc(char *c, int len) {
2428 treset(); 2428 treset();
2429 term.esc = 0; 2429 term.esc = 0;
2430 xresettitle(); 2430 xresettitle();
2431 xloadcols();
2431 break; 2432 break;
2432 case '=': /* DECPAM -- Application keypad */ 2433 case '=': /* DECPAM -- Application keypad */
2433 term.mode |= MODE_APPKEYPAD; 2434 term.mode |= MODE_APPKEYPAD;
@@ -2589,6 +2590,13 @@ void
2589xloadcols(void) { 2590xloadcols(void) {
2590 int i, r, g, b; 2591 int i, r, g, b;
2591 XRenderColor color = { .alpha = 0xffff }; 2592 XRenderColor color = { .alpha = 0xffff };
2593 static bool loaded;
2594 Colour *cp;
2595
2596 if(loaded) {
2597 for (cp = dc.col; cp < dc.col + LEN(dc.col); ++cp)
2598 XftColorFree(xw.dpy, xw.vis, xw.cmap, cp);
2599 }
2592 2600
2593 /* load colors [0-15] colors and [256-LEN(colorname)[ (config.h) */ 2601 /* load colors [0-15] colors and [256-LEN(colorname)[ (config.h) */
2594 for(i = 0; i < LEN(colorname); i++) { 2602 for(i = 0; i < LEN(colorname); i++) {
@@ -2621,6 +2629,7 @@ xloadcols(void) {
2621 die("Could not allocate color %d\n", i); 2629 die("Could not allocate color %d\n", i);
2622 } 2630 }
2623 } 2631 }
2632 loaded = true;
2624} 2633}
2625 2634
2626int 2635int