; support OSC 10 and 11 commands for xterm default fg/bg colour ; http://www.xfree86.org/current/ctlseqs.html ; P s = 1 0 → Change VT100 text foreground color to P t ; P s = 1 1 → Change VT100 text background color to P t --- screen-4.1/ansi.c~ 2010-02-24 15:33:05.000000000 +0200 +++ screen-4.1/ansi.c 2010-02-24 15:42:23.596133932 +0200 @@ -1530,12 +1530,14 @@ } #endif #ifdef RXVT_OSC - if (typ == 0 || typ == 1 || typ == 2 || typ == 20 || typ == 39 || typ == 49) + if (typ == 0 || typ == 1 || typ == 2 || typ == 20 || typ == 39 || typ == 49 || typ == 10 || typ == 11 ) { int typ2; typ2 = typ / 10; if (--typ2 < 0) typ2 = 0; + if (typ == 10) typ2 = 4; + if (typ == 11) typ2 = 5; if (strcmp(curr->w_xtermosc[typ2], p)) { strncpy(curr->w_xtermosc[typ2], p, sizeof(curr->w_xtermosc[typ2]) - 1); @@ -1513,7 +1516,7 @@ continue; if (D_forecv->c_layer->l_bottom == &curr->w_layer) SetXtermOSC(typ2, curr->w_xtermosc[typ2]); - if ((typ2 == 2 || typ2 == 3) && D_xtermosc[typ2]) + if ((typ2 == 2 || typ2 == 3 || typ2 == 4 || typ2 == 5) && D_xtermosc[typ2]) Redisplay(0); } } --- screen-4.0.3/display.c 2003-12-05 14:45:41.000000000 +0100 +++ screen-4.0.3.wiget/display.c 2008-03-21 22:21:46.000000000 +0100 @@ -3053,7 +3053,7 @@ int i; char *s; { - static char oscs[] = "1;\000\00020;\00039;\00049;\000"; + static char oscs[] = "1;\000\00020;\00039;\00049;\00010;\00011;\000"; ASSERT(display); if (!D_CXT) @@ -3066,22 +3066,26 @@ s = "screen"; /* always set icon name */ if (i == 1 && !*s) s = ""; /* no background */ - if (i == 2 && !*s) + if ((i == 2 || i == 4) && !*s) s = "black"; /* black text */ - if (i == 3 && !*s) + if ((i == 3 || i == 5) && !*s) s = "white"; /* on white background */ D_xtermosc[i] = 1; AddStr("\033]"); AddStr(oscs + i * 4); AddStr(s); - AddChar(7); + if ((i == 4) || (i == 5)) { + AddStr("\033\\"); + } else { + AddChar(7); + } } void ClearAllXtermOSC() { int i; - for (i = 3; i >= 0; i--) + for (i = 5; i >= 0; i--) SetXtermOSC(i, 0); } #endif Tylko w screen-4.0.3.wiget: display.c~ --- screen-4.0.3/display.h 2003-07-01 16:01:42.000000000 +0200 +++ screen-4.0.3.wiget/display.h 2008-03-21 22:08:44.000000000 +0100 @@ -113,7 +113,7 @@ int d_lp_missing; /* last character on bot line missing */ int d_mouse; /* mouse mode */ #ifdef RXVT_OSC - int d_xtermosc[4]; /* osc used */ + int d_xtermosc[6]; /* osc used */ #endif struct mchar d_lpchar; /* missing char */ struct timeval d_status_time; /* time of status display */