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.94 by root, Mon Nov 29 13:37:20 2004 UTC vs.
Revision 1.96 by root, Sat Dec 11 23:01:36 2004 UTC

590 590
591 this->locale = rxvt_strdup (this->locale); 591 this->locale = rxvt_strdup (this->locale);
592 SET_LOCALE (this->locale); 592 SET_LOCALE (this->locale);
593 mbstate.reset (); 593 mbstate.reset ();
594#endif 594#endif
595
595#if 0 596#if 0
596#if HAVE_NL_LANGINFO 597#if HAVE_NL_LANGINFO
597 free (codeset);
598 codeset = strdup (nl_langinfo (CODESET)); 598 char *codeset = strdup (nl_langinfo (CODESET));
599 enc_utf8 = !strcasecmp (codeset, "UTF-8") 599 enc_utf8 = !strcasecmp (codeset, "UTF-8")
600 || !strcasecmp (codeset, "UTF8"); 600 || !strcasecmp (codeset, "UTF8");
601 free (codeset);
601#else 602#else
602 enc_utf8 = 1; 603 enc_utf8 = 0;
603#endif 604#endif
604#endif 605#endif
605} 606}
606 607
607void 608void
610#ifdef USE_XIM 611#ifdef USE_XIM
611 if (!locale) 612 if (!locale)
612 rxvt_warn ("setting locale failed, working without locale support.\n"); 613 rxvt_warn ("setting locale failed, working without locale support.\n");
613 else 614 else
614 { 615 {
615 Atom wmlocale; 616 set_string_property (display->atom ("WM_LOCALE_NAME"), locale);
616
617 wmlocale = XInternAtom (display->display, "WM_LOCALE_NAME", False);
618 XChangeProperty (display->display, TermWin.parent[0], wmlocale,
619 XA_STRING, 8, PropModeReplace,
620 (unsigned char *)locale, strlen (locale));
621 617
622 if (!XSupportsLocale ()) 618 if (!XSupportsLocale ())
623 { 619 {
624 rxvt_warn ("the locale is not supported by Xlib, working without locale support.\n"); 620 rxvt_warn ("the locale is not supported by Xlib, working without locale support.\n");
625 return; 621 return;
639{ 635{
640 /* 636 /*
641 * Initialize the command connection. 637 * Initialize the command connection.
642 * This should be called after the X server connection is established. 638 * This should be called after the X server connection is established.
643 */ 639 */
644 int i;
645
646 for (i = 0; i < NUM_XA; i++)
647 xa[i] = XInternAtom (display->display, xa_names[i], False);
648
649 /* Enable delete window protocol */
650 XSetWMProtocols (display->display, TermWin.parent[0],
651 & (xa[XA_WMDELETEWINDOW]), 1);
652
653#ifdef USING_W11LIB
654 /* enable W11 callbacks */
655 W11AddEventHandler (display->display, rxvt_W11_process_x_event);
656#endif
657 640
658#ifdef META8_OPTION 641#ifdef META8_OPTION
659 meta_char = (options & Opt_meta8 ? 0x80 : C0_ESC); 642 meta_char = (options & Opt_meta8 ? 0x80 : C0_ESC);
660#endif 643#endif
661 644
913 XGCValues gcvalue; 896 XGCValues gcvalue;
914 long vt_emask; 897 long vt_emask;
915 XSetWindowAttributes attributes; 898 XSetWindowAttributes attributes;
916 XWindowAttributes gattr; 899 XWindowAttributes gattr;
917 900
901 for (int i = 0; i < NUM_XA; i++)
902 xa[i] = XInternAtom (display->display, xa_names[i], False);
903
904#ifdef USING_W11LIB
905 /* enable W11 callbacks */
906 W11AddEventHandler (display->display, rxvt_W11_process_x_event);
907#endif
908
918 if (options & Opt_transparent) 909 if (options & Opt_transparent)
919 { 910 {
920 XGetWindowAttributes (display->display, RootWindow (display->display, display->screen), &gattr); 911 XGetWindowAttributes (display->display, RootWindow (display->display, display->screen), &gattr);
921 display->depth = gattr.depth; // doh //TODO, per-term not per-display? 912 display->depth = gattr.depth; // doh //TODO, per-term not per-display?
922 } 913 }
990 wmHint.window_group = TermWin.parent[0]; 981 wmHint.window_group = TermWin.parent[0];
991 982
992 XSetWMProperties (display->display, TermWin.parent[0], NULL, NULL, 983 XSetWMProperties (display->display, TermWin.parent[0], NULL, NULL,
993 (char **)argv, argc, &szHint, &wmHint, &classHint); 984 (char **)argv, argc, &szHint, &wmHint, &classHint);
994 985
986 /* Enable delete window protocol */
987 XSetWMProtocols (display->display, TermWin.parent[0],
988 &xa[XA_WMDELETEWINDOW], 1);
989
995#if ENABLE_FRILLS 990#if ENABLE_FRILLS
996 long pid = getpid (); 991 long pid = getpid ();
997 992
998 XChangeProperty (display->display, TermWin.parent[0], 993 XChangeProperty (display->display, TermWin.parent[0],
999 display->atom ("_NET_WM_PID"), XA_CARDINAL, 32, 994 display->atom ("_NET_WM_PID"), XA_CARDINAL, 32,

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines