… | |
… | |
748 | alias_color (Color_topShadow, Color_White); |
748 | alias_color (Color_topShadow, Color_White); |
749 | } |
749 | } |
750 | #endif /* KEEP_SCROLLCOLOR */ |
750 | #endif /* KEEP_SCROLLCOLOR */ |
751 | |
751 | |
752 | #ifdef OFF_FOCUS_FADING |
752 | #ifdef OFF_FOCUS_FADING |
753 | if (rs[Rs_fade]) |
|
|
754 | for (i = 0; i < (depth <= 2 ? 2 : NRS_COLORS); i++) |
753 | for (i = 0; i < (depth <= 2 ? 2 : NRS_COLORS); i++) |
755 | { |
754 | update_fade_color (i); |
756 | rgba c; |
|
|
757 | pix_colors [Color_fade].get (c); |
|
|
758 | pix_colors_focused [i].fade (this, atoi (rs[Rs_fade]), pix_colors_unfocused[i],c); |
|
|
759 | } |
|
|
760 | #endif |
755 | #endif |
761 | } |
756 | } |
762 | |
757 | |
763 | /*----------------------------------------------------------------------*/ |
758 | /*----------------------------------------------------------------------*/ |
764 | /* color aliases, fg/bg bright-bold */ |
759 | /* color aliases, fg/bg bright-bold */ |
… | |
… | |
1084 | * GET TTY CURRENT STATE * |
1079 | * GET TTY CURRENT STATE * |
1085 | * ------------------------------------------------------------------------- */ |
1080 | * ------------------------------------------------------------------------- */ |
1086 | void |
1081 | void |
1087 | rxvt_get_ttymode (ttymode_t *tio, int erase) |
1082 | rxvt_get_ttymode (ttymode_t *tio, int erase) |
1088 | { |
1083 | { |
1089 | #ifdef HAVE_TERMIOS_H |
|
|
1090 | /* |
1084 | /* |
1091 | * standard System V termios interface |
1085 | * standard System V termios interface |
1092 | */ |
1086 | */ |
1093 | if (GET_TERMIOS (STDIN_FILENO, tio) < 0) |
1087 | if (GET_TERMIOS (STDIN_FILENO, tio) < 0) |
1094 | { |
1088 | { |
… | |
… | |
1161 | tio->c_lflag = (ISIG | ICANON | IEXTEN | ECHO |
1155 | tio->c_lflag = (ISIG | ICANON | IEXTEN | ECHO |
1162 | # if defined (ECHOCTL) && defined (ECHOKE) |
1156 | # if defined (ECHOCTL) && defined (ECHOKE) |
1163 | | ECHOCTL | ECHOKE |
1157 | | ECHOCTL | ECHOKE |
1164 | # endif |
1158 | # endif |
1165 | | ECHOE | ECHOK); |
1159 | | ECHOE | ECHOK); |
1166 | # else /* HAVE_TERMIOS_H */ |
|
|
1167 | |
|
|
1168 | /* |
|
|
1169 | * sgtty interface |
|
|
1170 | */ |
|
|
1171 | |
|
|
1172 | /* get parameters -- gtty */ |
|
|
1173 | if (ioctl (STDIN_FILENO, TIOCGETP, & (tio->sg)) < 0) |
|
|
1174 | { |
|
|
1175 | tio->sg.sg_erase = CERASE; /* ^H */ |
|
|
1176 | tio->sg.sg_kill = CKILL; /* ^U */ |
|
|
1177 | } |
|
|
1178 | |
|
|
1179 | if (erase != -1) |
|
|
1180 | tio->sg.sg_erase = (char)erase; |
|
|
1181 | |
|
|
1182 | tio->sg.sg_flags = (CRMOD | ECHO | EVENP | ODDP); |
|
|
1183 | |
|
|
1184 | /* get special characters */ |
|
|
1185 | if (ioctl (STDIN_FILENO, TIOCGETC, & (tio->tc)) < 0) |
|
|
1186 | { |
|
|
1187 | tio->tc.t_intrc = CINTR; /* ^C */ |
|
|
1188 | tio->tc.t_quitc = CQUIT; /* ^\ */ |
|
|
1189 | tio->tc.t_startc = CSTART; /* ^Q */ |
|
|
1190 | tio->tc.t_stopc = CSTOP; /* ^S */ |
|
|
1191 | tio->tc.t_eofc = CEOF; /* ^D */ |
|
|
1192 | tio->tc.t_brkc = -1; |
|
|
1193 | } |
|
|
1194 | |
|
|
1195 | /* get local special chars */ |
|
|
1196 | if (ioctl (STDIN_FILENO, TIOCGLTC, & (tio->lc)) < 0) |
|
|
1197 | { |
|
|
1198 | tio->lc.t_suspc = CSUSP; /* ^Z */ |
|
|
1199 | tio->lc.t_dsuspc = CDSUSP; /* ^Y */ |
|
|
1200 | tio->lc.t_rprntc = CRPRNT; /* ^R */ |
|
|
1201 | tio->lc.t_flushc = CFLUSH; /* ^O */ |
|
|
1202 | tio->lc.t_werasc = CWERASE; /* ^W */ |
|
|
1203 | tio->lc.t_lnextc = CLNEXT; /* ^V */ |
|
|
1204 | } |
|
|
1205 | /* get line discipline */ |
|
|
1206 | ioctl (STDIN_FILENO, TIOCGETD, & (tio->line)); |
|
|
1207 | # ifdef NTTYDISC |
|
|
1208 | tio->line = NTTYDISC; |
|
|
1209 | # endif /* NTTYDISC */ |
|
|
1210 | |
|
|
1211 | tio->local = (LCRTBS | LCRTERA | LCTLECH | LPASS8 | LCRTKIL); |
|
|
1212 | #endif /* HAVE_TERMIOS_H */ |
|
|
1213 | |
1160 | |
1214 | /* |
1161 | /* |
1215 | * Debugging |
1162 | * Debugging |
1216 | */ |
1163 | */ |
1217 | #ifdef DEBUG_TTYMODE |
1164 | #ifdef DEBUG_TTYMODE |
… | |
… | |
1318 | else |
1265 | else |
1319 | #endif |
1266 | #endif |
1320 | if (!pty->get ()) |
1267 | if (!pty->get ()) |
1321 | rxvt_fatal ("can't initialize pseudo-tty, aborting.\n"); |
1268 | rxvt_fatal ("can't initialize pseudo-tty, aborting.\n"); |
1322 | |
1269 | |
1323 | pty->set_utf8_mode (enc_utf8); |
|
|
1324 | |
|
|
1325 | /* set initial window size */ |
|
|
1326 | tt_winch (); |
|
|
1327 | |
|
|
1328 | int er; |
1270 | int er; |
1329 | |
1271 | |
1330 | #ifndef NO_BACKSPACE_KEY |
1272 | #ifndef NO_BACKSPACE_KEY |
1331 | if (key_backspace[0] && !key_backspace[1]) |
1273 | if (key_backspace[0] && !key_backspace[1]) |
1332 | er = key_backspace[0]; |
1274 | er = key_backspace[0]; |
… | |
… | |
1335 | else |
1277 | else |
1336 | #endif |
1278 | #endif |
1337 | er = -1; |
1279 | er = -1; |
1338 | |
1280 | |
1339 | rxvt_get_ttymode (&tio, er); |
1281 | rxvt_get_ttymode (&tio, er); |
|
|
1282 | SET_TERMIOS (pty->tty, &tio); /* init terminal attributes */ |
|
|
1283 | pty->set_utf8_mode (enc_utf8); |
|
|
1284 | |
|
|
1285 | /* set initial window size */ |
|
|
1286 | tt_winch (); |
1340 | |
1287 | |
1341 | #if ENABLE_FRILLS |
1288 | #if ENABLE_FRILLS |
1342 | if (rs[Rs_pty_fd]) |
1289 | if (rs[Rs_pty_fd]) |
1343 | return; |
1290 | return; |
1344 | #endif |
1291 | #endif |
… | |
… | |
1398 | */ |
1345 | */ |
1399 | int |
1346 | int |
1400 | rxvt_term::run_child (const char *const *argv) |
1347 | rxvt_term::run_child (const char *const *argv) |
1401 | { |
1348 | { |
1402 | char *login; |
1349 | char *login; |
1403 | |
|
|
1404 | SET_TTYMODE (STDIN_FILENO, &tio); /* init terminal attributes */ |
|
|
1405 | |
1350 | |
1406 | if (OPTION (Opt_console)) |
1351 | if (OPTION (Opt_console)) |
1407 | { /* be virtual console, fail silently */ |
1352 | { /* be virtual console, fail silently */ |
1408 | #ifdef TIOCCONS |
1353 | #ifdef TIOCCONS |
1409 | unsigned int on = 1; |
1354 | unsigned int on = 1; |