… | |
… | |
402 | #endif |
402 | #endif |
403 | |
403 | |
404 | refresh_limit = 1; |
404 | refresh_limit = 1; |
405 | refresh_type = SLOW_REFRESH; |
405 | refresh_type = SLOW_REFRESH; |
406 | prev_nrow = prev_ncol = 0; |
406 | prev_nrow = prev_ncol = 0; |
407 | #ifdef MULTICHAR_SET |
|
|
408 | # ifdef MULTICHAR_ENCODING |
|
|
409 | encoding_method = MULTICHAR_ENCODING; |
|
|
410 | # endif |
|
|
411 | multichar_decode = rxvt_euc2jis; |
|
|
412 | #endif |
|
|
413 | |
407 | |
414 | oldcursor.row = oldcursor.col = -1; |
408 | oldcursor.row = oldcursor.col = -1; |
415 | #ifdef XPM_BACKGROUND |
409 | #ifdef XPM_BACKGROUND |
416 | /* bgPixmap.w = bgPixmap.h = 0; */ |
410 | /* bgPixmap.w = bgPixmap.h = 0; */ |
417 | bgPixmap.x = bgPixmap.y = 50; |
411 | bgPixmap.x = bgPixmap.y = 50; |
… | |
… | |
663 | |
657 | |
664 | #ifdef HAVE_SCROLLBARS |
658 | #ifdef HAVE_SCROLLBARS |
665 | setup_scrollbar (rs[Rs_scrollBar_align], rs[Rs_scrollstyle], |
659 | setup_scrollbar (rs[Rs_scrollBar_align], rs[Rs_scrollstyle], |
666 | rs[Rs_scrollBar_thickness]); |
660 | rs[Rs_scrollBar_thickness]); |
667 | #endif |
661 | #endif |
668 | |
|
|
669 | TermWin.fontset = new rxvt_fontset (this); |
|
|
670 | TermWin.fontset->populate (rs[Rs_font]); |
|
|
671 | TermWin.fwidth = TermWin.fontset->base_font ()->width; |
|
|
672 | TermWin.fheight = TermWin.fontset->base_font ()->height; |
|
|
673 | TermWin.fbase = TermWin.fontset->base_font ()->ascent; |
|
|
674 | |
662 | |
675 | #ifdef XTERM_REVERSE_VIDEO |
663 | #ifdef XTERM_REVERSE_VIDEO |
676 | /* this is how xterm implements reverseVideo */ |
664 | /* this is how xterm implements reverseVideo */ |
677 | if (Options & Opt_reverseVideo) |
665 | if (Options & Opt_reverseVideo) |
678 | { |
666 | { |
… | |
… | |
802 | void |
790 | void |
803 | rxvt_term::set_locale (const char *locale) |
791 | rxvt_term::set_locale (const char *locale) |
804 | { |
792 | { |
805 | #if HAVE_XSETLOCALE || HAVE_SETLOCALE |
793 | #if HAVE_XSETLOCALE || HAVE_SETLOCALE |
806 | free (this->locale); |
794 | free (this->locale); |
807 | this->locale = rxvt_strdup (setlocale (LC_CTYPE, "")); |
795 | this->locale = rxvt_strdup (setlocale (LC_CTYPE, locale)); |
808 | SET_LOCALE (this->locale); |
796 | SET_LOCALE (this->locale); |
809 | mbstate.reset (); |
797 | mbstate.reset (); |
810 | #endif |
798 | #endif |
811 | #if HAVE_NL_LANGINFO |
799 | #if HAVE_NL_LANGINFO |
812 | free (codeset); |
800 | free (codeset); |
… | |
… | |
1137 | } |
1125 | } |
1138 | |
1126 | |
1139 | /* grab colors before netscape does */ |
1127 | /* grab colors before netscape does */ |
1140 | Get_Colours (); |
1128 | Get_Colours (); |
1141 | |
1129 | |
1142 | change_font (1, NULL); |
1130 | if (!change_font (rs[Rs_font])) |
|
|
1131 | { |
|
|
1132 | fprintf (stderr, "unable to load a base font, please provide one using -fn fontname\n"); |
|
|
1133 | destroy (); |
|
|
1134 | return; |
|
|
1135 | } |
|
|
1136 | |
1143 | window_calc (0, 0); |
1137 | window_calc (0, 0); |
1144 | old_width = szHint.width; |
1138 | old_width = szHint.width; |
1145 | old_height = szHint.height; |
1139 | old_height = szHint.height; |
1146 | |
1140 | |
1147 | /* parent window - reverse video so we can see placement errors |
1141 | /* parent window - reverse video so we can see placement errors |
… | |
… | |
1256 | PixColors[Color_scroll]); |
1250 | PixColors[Color_scroll]); |
1257 | #ifdef DEBUG_X |
1251 | #ifdef DEBUG_X |
1258 | XStoreName (display->display, menuBar.win, "menubar"); |
1252 | XStoreName (display->display, menuBar.win, "menubar"); |
1259 | #endif |
1253 | #endif |
1260 | |
1254 | |
1261 | XDefineCursor (display->display, menuBar.win, pointer_leftptr); |
1255 | XDefineCursor (display->display, menuBar.win, |
|
|
1256 | XCreateFontCursor (display->display, XC_left_ptr)); |
1262 | |
1257 | |
1263 | XSelectInput (display->display, menuBar.win, |
1258 | XSelectInput (display->display, menuBar.win, |
1264 | (ExposureMask | ButtonPressMask | ButtonReleaseMask |
1259 | (ExposureMask | ButtonPressMask | ButtonReleaseMask |
1265 | | Button1MotionMask)); |
1260 | | Button1MotionMask)); |
1266 | menubar_ev.start (display, menuBar.win); |
1261 | menubar_ev.start (display, menuBar.win); |