--- rxvt-unicode/src/init.C 2006/02/20 20:44:22 1.171 +++ rxvt-unicode/src/init.C 2007/01/20 00:37:13 1.175 @@ -1,4 +1,4 @@ -/*--------------------------------*-C-*---------------------------------* +/*----------------------------------------------------------------------* * File: init.C *----------------------------------------------------------------------* * @@ -302,14 +302,13 @@ // using a local pointer decreases code size a lot xa = display->xa; + set (display); + extract_resources (); + #if XFT if (rs[Rs_depth]) - set (display, strtol (rs[Rs_depth], 0, 0)); - else + select_visual (strtol (rs[Rs_depth], 0, 0)); #endif - set (display); - - extract_resources (); free (r_argv); @@ -751,13 +750,8 @@ #endif /* KEEP_SCROLLCOLOR */ #ifdef OFF_FOCUS_FADING - if (rs[Rs_fade]) - for (i = 0; i < (depth <= 2 ? 2 : NRS_COLORS); i++) - { - rgba c; - pix_colors [Color_fade].get (c); - pix_colors_focused [i].fade (this, atoi (rs[Rs_fade]), pix_colors_unfocused[i],c); - } + for (i = 0; i < (depth <= 2 ? 2 : NRS_COLORS); i++) + update_fade_color (i); #endif } @@ -1321,11 +1315,6 @@ if (!pty->get ()) rxvt_fatal ("can't initialize pseudo-tty, aborting.\n"); - pty->set_utf8_mode (enc_utf8); - - /* set initial window size */ - tt_winch (); - int er; #ifndef NO_BACKSPACE_KEY @@ -1338,6 +1327,11 @@ er = -1; rxvt_get_ttymode (&tio, er); + pty->set_utf8_mode (enc_utf8); + SET_TTYMODE (STDIN_FILENO, &tio); /* init terminal attributes */ + + /* set initial window size */ + tt_winch (); #if ENABLE_FRILLS if (rs[Rs_pty_fd]) @@ -1402,8 +1396,6 @@ { char *login; - SET_TTYMODE (STDIN_FILENO, &tio); /* init terminal attributes */ - if (OPTION (Opt_console)) { /* be virtual console, fail silently */ #ifdef TIOCCONS