… | |
… | |
297 | saveLines = SAVELINES; |
297 | saveLines = SAVELINES; |
298 | |
298 | |
299 | refresh_type = SLOW_REFRESH; |
299 | refresh_type = SLOW_REFRESH; |
300 | |
300 | |
301 | oldcursor.row = oldcursor.col = -1; |
301 | oldcursor.row = oldcursor.col = -1; |
302 | last_bot = last_state = -1; |
|
|
303 | |
302 | |
304 | set_option (Opt_scrollBar); |
303 | set_option (Opt_scrollBar); |
305 | set_option (Opt_scrollTtyOutput); |
304 | set_option (Opt_scrollTtyOutput); |
306 | set_option (Opt_jumpScroll); |
305 | set_option (Opt_jumpScroll); |
307 | set_option (Opt_skipScroll); |
306 | set_option (Opt_skipScroll); |
… | |
… | |
1076 | termwin_ev.start (display, top); |
1075 | termwin_ev.start (display, top); |
1077 | |
1076 | |
1078 | /* vt cursor: Black-on-White is standard, but this is more popular */ |
1077 | /* vt cursor: Black-on-White is standard, but this is more popular */ |
1079 | TermWin_cursor = XCreateFontCursor (dpy, XC_xterm); |
1078 | TermWin_cursor = XCreateFontCursor (dpy, XC_xterm); |
1080 | |
1079 | |
1081 | #ifdef HAVE_SCROLLBARS |
|
|
1082 | /* cursor scrollBar: Black-on-White */ |
|
|
1083 | leftptr_cursor = XCreateFontCursor (dpy, XC_left_ptr); |
|
|
1084 | #endif |
|
|
1085 | |
|
|
1086 | /* the vt window */ |
1080 | /* the vt window */ |
1087 | vt = XCreateSimpleWindow (dpy, top, |
1081 | vt = XCreateSimpleWindow (dpy, top, |
1088 | window_vt_x, window_vt_y, |
1082 | window_vt_x, window_vt_y, |
1089 | width, height, |
1083 | width, height, |
1090 | 0, |
1084 | 0, |
… | |
… | |
1114 | GCForeground | GCBackground | GCGraphicsExposures, |
1108 | GCForeground | GCBackground | GCGraphicsExposures, |
1115 | &gcvalue); |
1109 | &gcvalue); |
1116 | |
1110 | |
1117 | drawable = new rxvt_drawable (this, vt); |
1111 | drawable = new rxvt_drawable (this, vt); |
1118 | |
1112 | |
1119 | #ifdef RXVT_SCROLLBAR |
|
|
1120 | gcvalue.foreground = pix_colors[Color_topShadow]; |
|
|
1121 | topShadowGC = XCreateGC (dpy, vt, GCForeground, &gcvalue); |
|
|
1122 | gcvalue.foreground = pix_colors[Color_bottomShadow]; |
|
|
1123 | botShadowGC = XCreateGC (dpy, vt, GCForeground, &gcvalue); |
|
|
1124 | gcvalue.foreground = pix_colors[ (depth <= 2 ? Color_fg : Color_scroll)]; |
|
|
1125 | scrollbarGC = XCreateGC (dpy, vt, GCForeground, &gcvalue); |
|
|
1126 | #endif |
|
|
1127 | |
|
|
1128 | #ifdef OFF_FOCUS_FADING |
1113 | #ifdef OFF_FOCUS_FADING |
1129 | // initially we are in unfocused state |
1114 | // initially we are in unfocused state |
1130 | if (rs[Rs_fade]) |
1115 | if (rs[Rs_fade]) |
1131 | pix_colors = pix_colors_unfocused; |
1116 | pix_colors = pix_colors_unfocused; |
1132 | #endif |
1117 | #endif |
… | |
… | |
1137 | |
1122 | |
1138 | /* ------------------------------------------------------------------------- * |
1123 | /* ------------------------------------------------------------------------- * |
1139 | * GET TTY CURRENT STATE * |
1124 | * GET TTY CURRENT STATE * |
1140 | * ------------------------------------------------------------------------- */ |
1125 | * ------------------------------------------------------------------------- */ |
1141 | void |
1126 | void |
1142 | rxvt_get_ttymode (ttymode_t *tio, int erase) |
1127 | rxvt_get_ttymode (struct termios *tio, int erase) |
1143 | { |
1128 | { |
1144 | /* |
1129 | /* |
1145 | * standard System V termios interface |
1130 | * standard System V termios interface |
1146 | */ |
1131 | */ |
1147 | if (tcgetattr (STDIN_FILENO, tio) < 0) |
1132 | if (tcgetattr (STDIN_FILENO, tio) < 0) |
1148 | { |
1133 | { |
1149 | // return error - use system defaults, |
1134 | // return error - use system defaults, |
1150 | // where possible, and zero elsewhere |
1135 | // where possible, and zero elsewhere |
1151 | memset (tio, 0, sizeof (ttymode_t)); |
1136 | memset (tio, 0, sizeof (struct termios)); |
1152 | |
1137 | |
1153 | tio->c_cc[VINTR] = CINTR; |
1138 | tio->c_cc[VINTR] = CINTR; |
1154 | tio->c_cc[VQUIT] = CQUIT; |
1139 | tio->c_cc[VQUIT] = CQUIT; |
1155 | tio->c_cc[VERASE] = CERASE; |
1140 | tio->c_cc[VERASE] = CERASE; |
1156 | #ifdef VERASE2 |
1141 | #ifdef VERASE2 |