ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/rxvt-unicode/src/init.C
(Generate patch)

Comparing rxvt-unicode/src/init.C (file contents):
Revision 1.139 by root, Wed Jan 11 03:13:26 2006 UTC vs.
Revision 1.142 by root, Fri Jan 13 04:59:04 2006 UTC

339 rs[Rs_name] = rxvt_r_basename (argv[0]); 339 rs[Rs_name] = rxvt_r_basename (argv[0]);
340 340
341 /* 341 /*
342 * Open display, get options/resources and create the window 342 * Open display, get options/resources and create the window
343 */ 343 */
344 {
345 TEMP_ENV;
346 344
347 if ((rs[Rs_display_name] = getenv ("DISPLAY")) == NULL) 345 if ((rs[Rs_display_name] = getenv ("DISPLAY")) == NULL)
348 rs[Rs_display_name] = ":0"; 346 rs[Rs_display_name] = ":0";
349 347
350 get_options (r_argc, r_argv); 348 get_options (r_argc, r_argv);
351 349
352 if (!(display = displays.get (rs[Rs_display_name]))) 350 if (!(display = displays.get (rs[Rs_display_name])))
353 rxvt_fatal ("can't open display %s, aborting.\n", rs[Rs_display_name]); 351 rxvt_fatal ("can't open display %s, aborting.\n", rs[Rs_display_name]);
354 352
355 extract_resources (); 353 extract_resources ();
356 }
357 354
358 free (r_argv); 355 free (r_argv);
359 356
360 /* 357 /*
361 * set any defaults not already set 358 * set any defaults not already set
581 * This should support all European type languages. 578 * This should support all European type languages.
582 */ 579 */
583void 580void
584rxvt_term::set_locale (const char *locale) 581rxvt_term::set_locale (const char *locale)
585{ 582{
586 TEMP_ENV; 583 set_environ (envv);
587 584
588#if HAVE_XSETLOCALE || HAVE_SETLOCALE 585#if HAVE_XSETLOCALE || HAVE_SETLOCALE
589 free (this->locale); 586 free (this->locale);
590 this->locale = setlocale (LC_CTYPE, locale); 587 this->locale = setlocale (LC_CTYPE, locale);
591 588
622} 619}
623 620
624void 621void
625rxvt_term::init_xlocale () 622rxvt_term::init_xlocale ()
626{ 623{
627 TEMP_ENV; 624 set_environ (envv);
628 625
629#ifdef USE_XIM 626#ifdef USE_XIM
630 if (!locale) 627 if (!locale)
631 rxvt_warn ("setting locale failed, working without locale support.\n"); 628 rxvt_warn ("setting locale failed, working without locale support.\n");
632 else 629 else
925#if ENABLE_FRILLS 922#if ENABLE_FRILLS
926 Atom prop = None; 923 Atom prop = None;
927 MWMHints mwmhints; 924 MWMHints mwmhints;
928#endif 925#endif
929 XGCValues gcvalue; 926 XGCValues gcvalue;
930 long vt_emask;
931 XSetWindowAttributes attributes; 927 XSetWindowAttributes attributes;
932 XWindowAttributes gattr; 928 XWindowAttributes gattr;
933 Window top, parent; 929 Window top, parent;
934 dDisp; 930 dDisp;
935 931
1098 attributes.bit_gravity = NorthWestGravity; 1094 attributes.bit_gravity = NorthWestGravity;
1099 XChangeWindowAttributes (disp, vt, CWBitGravity, &attributes); 1095 XChangeWindowAttributes (disp, vt, CWBitGravity, &attributes);
1100 1096
1101 vt_emask = ExposureMask | ButtonPressMask | ButtonReleaseMask | PropertyChangeMask; 1097 vt_emask = ExposureMask | ButtonPressMask | ButtonReleaseMask | PropertyChangeMask;
1102 1098
1103 if (OPTION (Opt_pointerBlank) 1099 if (OPTION (Opt_pointerBlank))
1104#ifdef ENABLE_PERL
1105 || perl.self
1106#endif
1107 )
1108 vt_emask |= PointerMotionMask; 1100 vt_emask |= PointerMotionMask;
1109 else 1101 else
1110 vt_emask |= Button1MotionMask | Button3MotionMask; 1102 vt_emask |= Button1MotionMask | Button3MotionMask;
1111 1103
1112 XSelectInput (disp, vt, vt_emask); 1104 vt_select_input ();
1105
1113 vt_ev.start (display, vt); 1106 vt_ev.start (display, vt);
1114 1107
1115#if defined(MENUBAR) && (MENUBAR_MAX > 1) 1108#if defined(MENUBAR) && (MENUBAR_MAX > 1)
1116 if (menuBar_height ()) 1109 if (menuBar_height ())
1117 { 1110 {
1413 * the slave. 1406 * the slave.
1414 */ 1407 */
1415void 1408void
1416rxvt_term::run_command (const char *const *argv) 1409rxvt_term::run_command (const char *const *argv)
1417{ 1410{
1418 TEMP_ENV; // not very temporary...
1419
1420#if ENABLE_FRILLS 1411#if ENABLE_FRILLS
1421 if (rs[Rs_pty_fd]) 1412 if (rs[Rs_pty_fd])
1422 { 1413 {
1423 pty.pty = atoi (rs[Rs_pty_fd]); 1414 pty.pty = atoi (rs[Rs_pty_fd]);
1424 1415

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines