… | |
… | |
10 | * Copyright (c) 1996 Chuck Blake <cblake@BBN.COM> |
10 | * Copyright (c) 1996 Chuck Blake <cblake@BBN.COM> |
11 | * Copyright (c) 1997 mj olesen <olesen@me.queensu.ca> |
11 | * Copyright (c) 1997 mj olesen <olesen@me.queensu.ca> |
12 | * Copyright (c) 1997,1998 Oezguer Kesim <kesim@math.fu-berlin.de> |
12 | * Copyright (c) 1997,1998 Oezguer Kesim <kesim@math.fu-berlin.de> |
13 | * Copyright (c) 1998-2001 Geoff Wing <gcw@pobox.com> |
13 | * Copyright (c) 1998-2001 Geoff Wing <gcw@pobox.com> |
14 | * - extensive modifications |
14 | * - extensive modifications |
15 | * Copyright (c) 2003-2006 Marc Lehmann <pcg@goof.com> |
15 | * Copyright (c) 2003-2007 Marc Lehmann <pcg@goof.com> |
16 | * |
16 | * |
17 | * This program is free software; you can redistribute it and/or modify |
17 | * This program is free software; you can redistribute it and/or modify |
18 | * it under the terms of the GNU General Public License as published by |
18 | * it under the terms of the GNU General Public License as published by |
19 | * the Free Software Foundation; either version 2 of the License, or |
19 | * the Free Software Foundation; either version 2 of the License, or |
20 | * (at your option) any later version. |
20 | * (at your option) any later version. |
… | |
… | |
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 | |
|
|
292 | |
287 | |
293 | MEvent.time = CurrentTime; |
288 | MEvent.time = CurrentTime; |
294 | MEvent.button = AnyButton; |
289 | MEvent.button = AnyButton; |
295 | want_refresh = 1; |
290 | want_refresh = 1; |
296 | priv_modes = SavedModes = PrivMode_Default; |
291 | priv_modes = SavedModes = PrivMode_Default; |
… | |
… | |
298 | nrow = 24; |
293 | nrow = 24; |
299 | int_bwidth = INTERNALBORDERWIDTH; |
294 | int_bwidth = INTERNALBORDERWIDTH; |
300 | ext_bwidth = EXTERNALBORDERWIDTH; |
295 | ext_bwidth = EXTERNALBORDERWIDTH; |
301 | lineSpace = LINESPACE; |
296 | lineSpace = LINESPACE; |
302 | saveLines = SAVELINES; |
297 | saveLines = SAVELINES; |
303 | numpix_colors = TOTAL_COLORS; |
|
|
304 | |
298 | |
305 | refresh_type = SLOW_REFRESH; |
299 | refresh_type = SLOW_REFRESH; |
306 | |
300 | |
307 | oldcursor.row = oldcursor.col = -1; |
301 | oldcursor.row = oldcursor.col = -1; |
308 | last_bot = last_state = -1; |
302 | last_bot = last_state = -1; |
… | |
… | |
414 | if (rs[Rs_depth]) |
408 | if (rs[Rs_depth]) |
415 | select_visual (strtol (rs[Rs_depth], 0, 0)); |
409 | select_visual (strtol (rs[Rs_depth], 0, 0)); |
416 | #endif |
410 | #endif |
417 | |
411 | |
418 | #ifdef HAVE_AFTERIMAGE |
412 | #ifdef HAVE_AFTERIMAGE |
|
|
413 | set_application_name ((char*)rs[Rs_name]); |
|
|
414 | set_output_threshold (OUTPUT_LEVEL_WARNING); |
419 | 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); |
420 | #endif |
416 | #endif |
421 | free (r_argv); |
417 | free (r_argv); |
422 | |
418 | |
423 | for (int i = NUM_RESOURCES; i--; ) |
419 | for (int i = NUM_RESOURCES; i--; ) |
… | |
… | |
1146 | rxvt_get_ttymode (ttymode_t *tio, int erase) |
1142 | rxvt_get_ttymode (ttymode_t *tio, int erase) |
1147 | { |
1143 | { |
1148 | /* |
1144 | /* |
1149 | * standard System V termios interface |
1145 | * standard System V termios interface |
1150 | */ |
1146 | */ |
1151 | if (GET_TERMIOS (STDIN_FILENO, tio) < 0) |
1147 | if (tcgetattr (STDIN_FILENO, tio) < 0) |
1152 | { |
1148 | { |
1153 | // return error - use system defaults, |
1149 | // return error - use system defaults, |
1154 | // where possible, and zero elsewhere |
1150 | // where possible, and zero elsewhere |
1155 | memset (tio, 0, sizeof (ttymode_t)); |
1151 | memset (tio, 0, sizeof (ttymode_t)); |
1156 | |
1152 | |
… | |
… | |
1339 | else |
1335 | else |
1340 | #endif |
1336 | #endif |
1341 | er = -1; |
1337 | er = -1; |
1342 | |
1338 | |
1343 | rxvt_get_ttymode (&tio, er); |
1339 | rxvt_get_ttymode (&tio, er); |
1344 | 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); |
1345 | pty->set_utf8_mode (enc_utf8); |
1344 | pty->set_utf8_mode (enc_utf8); |
1346 | |
1345 | |
1347 | /* set initial window size */ |
1346 | /* set initial window size */ |
1348 | tt_winch (); |
1347 | tt_winch (); |
1349 | |
1348 | |