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

Comparing rxvt-unicode/src/main.C (file contents):
Revision 1.175 by root, Thu Jan 12 00:35:39 2006 UTC vs.
Revision 1.177 by root, Mon Jan 16 06:37:52 2006 UTC

89rxvt_pop_locale () 89rxvt_pop_locale ()
90{ 90{
91 rxvt_set_locale (savelocale); 91 rxvt_set_locale (savelocale);
92} 92}
93 93
94void
95rxvt_term::make_current () const
96{
97 SET_R (this);
98 rxvt_set_locale (locale);
99 set_environ (envv);
100}
101
94#if ENABLE_COMBINING 102#if ENABLE_COMBINING
95class rxvt_composite_vec rxvt_composite; 103class rxvt_composite_vec rxvt_composite;
96 104
97text_t rxvt_composite_vec::compose (unicode_t c1, unicode_t c2) 105text_t rxvt_composite_vec::compose (unicode_t c1, unicode_t c2)
98{ 106{
377} 385}
378 386
379void 387void
380rxvt_term::destroy_cb (time_watcher &w) 388rxvt_term::destroy_cb (time_watcher &w)
381{ 389{
382 SET_R (this); 390 make_current ();
383 391
384 delete this; 392 delete this;
385} 393}
386 394
387/*----------------------------------------------------------------------*/ 395/*----------------------------------------------------------------------*/
478/*----------------------------------------------------------------------*/ 486/*----------------------------------------------------------------------*/
479bool 487bool
480rxvt_term::init (int argc, const char *const *argv) 488rxvt_term::init (int argc, const char *const *argv)
481{ 489{
482 SET_R (this); 490 SET_R (this);
483 TEMP_ENV; // few things in X do not call setlocale :(
484
485 set_locale (""); 491 set_locale ("");
492 set_environ (envv); // few things in X do not call setlocale :(
486 493
487 if (!init_vars ()) 494 if (!init_vars ())
488 return false; 495 return false;
489 496
490 init_secondary (); 497 init_secondary ();
523 rs[Rs_perl_eval] = 0; 530 rs[Rs_perl_eval] = 0;
524 } 531 }
525 } 532 }
526#endif 533#endif
527 rxvt_perl.init (); 534 rxvt_perl.init ();
528 setlocale (LC_CTYPE, curlocale); // perl init destroys this info 535 setlocale (LC_CTYPE, curlocale); // perl init destroys current locale
529 HOOK_INVOKE ((this, HOOK_INIT, DT_END)); 536 HOOK_INVOKE ((this, HOOK_INIT, DT_END));
530 } 537 }
531#endif 538#endif
532 539
533 create_windows (argc, argv); 540 create_windows (argc, argv);
1451 unsigned long fg, bg; 1458 unsigned long fg, bg;
1452 const char *p; 1459 const char *p;
1453 char **s; 1460 char **s;
1454 XIMStyles *xim_styles; 1461 XIMStyles *xim_styles;
1455 1462
1456 TEMP_ENV; 1463 set_environ (envv);
1457 1464
1458 if (! ((p = XSetLocaleModifiers (modifiers)) && *p)) 1465 if (! ((p = XSetLocaleModifiers (modifiers)) && *p))
1459 return false; 1466 return false;
1460 1467
1461 D_MAIN ((stderr, "rxvt_IM_get_IC ()")); 1468 D_MAIN ((stderr, "rxvt_IM_get_IC ()"));
1627 int i; 1634 int i;
1628 const char *p; 1635 const char *p;
1629 char **s; 1636 char **s;
1630 char buf[IMBUFSIZ]; 1637 char buf[IMBUFSIZ];
1631 1638
1632 SET_R (this); 1639 make_current ();
1633 1640
1634 im_destroy (); 1641 im_destroy ();
1635 1642
1636 D_MAIN ((stderr, "rxvt_IMInstantiateCallback ()")); 1643 D_MAIN ((stderr, "rxvt_IMInstantiateCallback ()"));
1637 if (Input_Context) 1644 if (Input_Context)

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines