new_cursorFillGC = XCreateGC (screen->display, TextWindow(screen), mask, &xgcv);
new_cursorFillGC = XCreateGC (screen->display, VWindow(screen), mask, &xgcv);
set_cursor_gcs (TScreen *screen){    XGCValues xgcv;    XtGCMask mask;    Pixel cc = screen->cursorcolor;    Pixel fg = screen->foreground;    Pixel bg = term->core.background_pixel;    GC new_cursorGC = NULL;    GC new_cursorFillGC = NULL;    GC new_reversecursorGC = NULL;    GC new_cursoroutlineGC = NULL;    /*     * Let's see, there are three things that have "color":     *     *     background     *     text     *     cursorblock     *     * And, there are four situation when drawing a cursor, if we decide     * that we like have a solid block of cursor color with the letter     * that it is highlighting shown in the background color to make it     * stand out:     *     *     selected window, normal video - background on cursor     *     selected window, reverse video - foreground on cursor     *     unselected window, normal video - foreground on background     *     unselected window, reverse video - background on foreground     *     * Since the last two are really just normalGC and reverseGC, we only     * need two new GC's.  Under monochrome, we get the same effect as     * above by setting cursor color to foreground.     */#if OPT_ISO_COLORS    /*     * If we're using ANSI colors, the functions manipulating the SGR code will     * use the same GC's.  To avoid having the cursor change color, we use the     * Xlib calls rather than the Xt calls.     *     * Use the colorMode value to determine which we'll do (the TextWindow may     * not be set before the widget's realized, so it's tested separately).     */    if(screen->colorMode) {	if (TextWindow(screen) != 0 && (cc != bg) && (cc != fg)) {	    /* we might have a colored foreground/background later */	    xgcv.font = screen->fnt_norm->fid;	    mask = (GCForeground | GCBackground | GCFont);	    xgcv.foreground = fg;	    xgcv.background = cc;	    new_cursorGC = XCreateGC (screen->display, TextWindow(screen), mask, &xgcv);	    xgcv.foreground = cc;	    xgcv.background = fg;	    new_cursorFillGC = XCreateGC (screen->display, TextWindow(screen), mask, &xgcv);	    if (screen->always_highlight) {		new_reversecursorGC = (GC) 0;		new_cursoroutlineGC = (GC) 0;	    } else {		xgcv.foreground = bg;		xgcv.background = cc;		new_reversecursorGC = XCreateGC (screen->display, TextWindow(screen), mask, &xgcv);		xgcv.foreground = cc;		xgcv.background = bg;		new_cursoroutlineGC = XCreateGC (screen->display, TextWindow(screen), mask, &xgcv);	    }	}    } else#endif    if (cc != fg && cc != bg) {	/* we have a colored cursor */	xgcv.font = screen->fnt_norm->fid;	mask = (GCForeground | GCBackground | GCFont);	xgcv.foreground = fg;	xgcv.background = cc;	new_cursorGC = XtGetGC ((Widget) term, mask, &xgcv);	xgcv.foreground = cc;	xgcv.background = fg;	new_cursorFillGC = XtGetGC ((Widget) term, mask, &xgcv);	if (screen->always_highlight) {	    new_reversecursorGC = (GC) 0;	    new_cursoroutlineGC = (GC) 0;	} else {	    xgcv.foreground = bg;	    xgcv.background = cc;	    new_reversecursorGC = XtGetGC ((Widget) term, mask, &xgcv);	    xgcv.foreground = cc;	    xgcv.background = bg;	    new_cursoroutlineGC = XtGetGC ((Widget) term, mask, &xgcv);	}    }#if OPT_ISO_COLORS    if(screen->colorMode)    {	if (screen->cursorGC)	    XFreeGC (screen->display, screen->cursorGC);	if (screen->fillCursorGC)	    XFreeGC (screen->display, screen->fillCursorGC);	if (screen->reversecursorGC)	    XFreeGC (screen->display, screen->reversecursorGC);	if (screen->cursoroutlineGC)	    XFreeGC (screen->display, screen->cursoroutlineGC);    }    else#endif    {	if (screen->cursorGC)	    XtReleaseGC ((Widget)term, screen->cursorGC);	if (screen->fillCursorGC)	    XtReleaseGC ((Widget)term, screen->fillCursorGC);	if (screen->reversecursorGC)	    XtReleaseGC ((Widget)term, screen->reversecursorGC);	if (screen->cursoroutlineGC)	    XtReleaseGC ((Widget)term, screen->cursoroutlineGC);    }    screen->cursorGC        = new_cursorGC;    screen->fillCursorGC    = new_cursorFillGC;    screen->reversecursorGC = new_reversecursorGC;    screen->cursoroutlineGC = new_cursoroutlineGC;}