set_window_background();
void palette_reset(void){    /* This maps colour indices in cfg to those used in inst->cols. */    static const int ww[] = {	6, 7, 8, 9, 10, 11, 12, 13,        14, 15, 16, 17, 18, 19, 20, 21,	0, 1, 2, 3, 4, 5    };    gboolean success[NCOLOURS];    int i;    assert(lenof(ww) == NCOLOURS);    if (!inst->colmap) {	inst->colmap = gdk_colormap_get_system();    } else {	gdk_colormap_free_colors(inst->colmap, inst->cols, NCOLOURS);    }    for (i = 0; i < NCOLOURS; i++) {	inst->cols[i].red = cfg.colours[ww[i]][0] * 0x0101;	inst->cols[i].green = cfg.colours[ww[i]][1] * 0x0101;	inst->cols[i].blue = cfg.colours[ww[i]][2] * 0x0101;    }    gdk_colormap_alloc_colors(inst->colmap, inst->cols, NCOLOURS,			      FALSE, FALSE, success);    for (i = 0; i < NCOLOURS; i++) {	if (!success[i])	    g_error("pterm: couldn't allocate colour %d (#%02x%02x%02x)\n",		    i, cfg.colours[i][0], cfg.colours[i][1], cfg.colours[i][2]);    }}