… | |
… | |
281 | }; |
281 | }; |
282 | |
282 | |
283 | void |
283 | void |
284 | rxvt_term::init_vars () |
284 | rxvt_term::init_vars () |
285 | { |
285 | { |
286 | pix_colors = // |
286 | pix_colors = pix_colors_focused; |
287 | pix_colors_focused = new rxvt_color [TOTAL_COLORS]; |
|
|
288 | #ifdef OFF_FOCUS_FADING |
|
|
289 | pix_colors_unfocused = new rxvt_color [TOTAL_COLORS]; |
|
|
290 | #endif |
|
|
291 | |
287 | |
292 | MEvent.time = CurrentTime; |
288 | MEvent.time = CurrentTime; |
293 | MEvent.button = AnyButton; |
289 | MEvent.button = AnyButton; |
294 | want_refresh = 1; |
290 | want_refresh = 1; |
295 | priv_modes = SavedModes = PrivMode_Default; |
291 | priv_modes = SavedModes = PrivMode_Default; |
… | |
… | |
297 | nrow = 24; |
293 | nrow = 24; |
298 | int_bwidth = INTERNALBORDERWIDTH; |
294 | int_bwidth = INTERNALBORDERWIDTH; |
299 | ext_bwidth = EXTERNALBORDERWIDTH; |
295 | ext_bwidth = EXTERNALBORDERWIDTH; |
300 | lineSpace = LINESPACE; |
296 | lineSpace = LINESPACE; |
301 | saveLines = SAVELINES; |
297 | saveLines = SAVELINES; |
302 | numpix_colors = TOTAL_COLORS; |
|
|
303 | |
298 | |
304 | refresh_type = SLOW_REFRESH; |
299 | refresh_type = SLOW_REFRESH; |
305 | |
300 | |
306 | oldcursor.row = oldcursor.col = -1; |
301 | oldcursor.row = oldcursor.col = -1; |
307 | last_bot = last_state = -1; |
302 | last_bot = last_state = -1; |
… | |
… | |
413 | if (rs[Rs_depth]) |
408 | if (rs[Rs_depth]) |
414 | select_visual (strtol (rs[Rs_depth], 0, 0)); |
409 | select_visual (strtol (rs[Rs_depth], 0, 0)); |
415 | #endif |
410 | #endif |
416 | |
411 | |
417 | #ifdef HAVE_AFTERIMAGE |
412 | #ifdef HAVE_AFTERIMAGE |
|
|
413 | set_application_name ((char*)rs[Rs_name]); |
|
|
414 | set_output_threshold (OUTPUT_LEVEL_WARNING); |
418 | asv = create_asvisual_for_id (dpy, display->screen, depth, XVisualIDFromVisual (visual), cmap, NULL); |
415 | asv = create_asvisual_for_id (dpy, display->screen, depth, XVisualIDFromVisual (visual), cmap, NULL); |
419 | #endif |
416 | #endif |
420 | free (r_argv); |
417 | free (r_argv); |
421 | |
418 | |
422 | for (int i = NUM_RESOURCES; i--; ) |
419 | for (int i = NUM_RESOURCES; i--; ) |
… | |
… | |
1145 | rxvt_get_ttymode (ttymode_t *tio, int erase) |
1142 | rxvt_get_ttymode (ttymode_t *tio, int erase) |
1146 | { |
1143 | { |
1147 | /* |
1144 | /* |
1148 | * standard System V termios interface |
1145 | * standard System V termios interface |
1149 | */ |
1146 | */ |
1150 | if (GET_TERMIOS (STDIN_FILENO, tio) < 0) |
1147 | if (tcgetattr (STDIN_FILENO, tio) < 0) |
1151 | { |
1148 | { |
1152 | // return error - use system defaults, |
1149 | // return error - use system defaults, |
1153 | // where possible, and zero elsewhere |
1150 | // where possible, and zero elsewhere |
1154 | memset (tio, 0, sizeof (ttymode_t)); |
1151 | memset (tio, 0, sizeof (ttymode_t)); |
1155 | |
1152 | |
… | |
… | |
1338 | else |
1335 | else |
1339 | #endif |
1336 | #endif |
1340 | er = -1; |
1337 | er = -1; |
1341 | |
1338 | |
1342 | rxvt_get_ttymode (&tio, er); |
1339 | rxvt_get_ttymode (&tio, er); |
1343 | SET_TERMIOS (pty->tty, &tio); /* init terminal attributes */ |
1340 | /* init terminal attributes */ |
|
|
1341 | cfsetospeed (&tio, BAUDRATE); |
|
|
1342 | cfsetispeed (&tio, BAUDRATE); |
|
|
1343 | tcsetattr (pty->tty, TCSANOW, &tio); |
1344 | pty->set_utf8_mode (enc_utf8); |
1344 | pty->set_utf8_mode (enc_utf8); |
1345 | |
1345 | |
1346 | /* set initial window size */ |
1346 | /* set initial window size */ |
1347 | tt_winch (); |
1347 | tt_winch (); |
1348 | |
1348 | |