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.297 by sf-exg, Mon Aug 15 11:01:54 2011 UTC vs.
Revision 1.302 by sf-exg, Fri Dec 2 09:03:43 2011 UTC

53# endif 53# endif
54#endif 54#endif
55 55
56#ifdef HAVE_NL_LANGINFO 56#ifdef HAVE_NL_LANGINFO
57# include <langinfo.h> 57# include <langinfo.h>
58#endif
59
60#ifdef HAVE_STARTUP_NOTIFICATION
61# define SN_API_NOT_YET_FROZEN
62# include <libsn/sn-launchee.h>
58#endif 63#endif
59 64
60#ifdef DISPLAY_IS_IP 65#ifdef DISPLAY_IS_IP
61/* On Solaris link with -lsocket and -lnsl */ 66/* On Solaris link with -lsocket and -lnsl */
62#include <sys/types.h> 67#include <sys/types.h>
640 rxvt_perl.init (this); 645 rxvt_perl.init (this);
641 HOOK_INVOKE ((this, HOOK_INIT, DT_END)); 646 HOOK_INVOKE ((this, HOOK_INIT, DT_END));
642 } 647 }
643#endif 648#endif
644 649
650 // must be called after initialising the perl interpreter as it
651 // may invoke the `on_register_command' hook
652 extract_keysym_resources ();
653
645 /* 654 /*
646 * set any defaults not already set 655 * set any defaults not already set
647 */ 656 */
648 if (cmd_argv && cmd_argv[0]) 657 if (cmd_argv && cmd_argv[0])
649 { 658 {
784 if (chdir (path)) 793 if (chdir (path))
785 rxvt_fatal ("unable to change into specified shell working directory, aborting.\n"); 794 rxvt_fatal ("unable to change into specified shell working directory, aborting.\n");
786 } 795 }
787 796
788 if (option (Opt_scrollBar)) 797 if (option (Opt_scrollBar))
789 scrollBar.state = STATE_IDLE; /* set existence for size calculations */ 798 scrollBar.state = SB_STATE_IDLE; /* set existence for size calculations */
790 799
791 pty = ptytty::create (); 800 pty = ptytty::create ();
801
802#ifdef HAVE_AFTERIMAGE
803 set_application_name ((char *)rs[Rs_name]);
804 set_output_threshold (OUTPUT_LEVEL_WARNING);
805#endif
806
807 // must be called before create_windows, because the latter may call set_icon
808#ifdef HAVE_PIXBUF
809 g_type_init ();
810#endif
792 811
793 create_windows (argc, argv); 812 create_windows (argc, argv);
794 813
795 init_xlocale (); 814 init_xlocale ();
796 815
827#endif 846#endif
828 847
829#ifdef BG_IMAGE_FROM_FILE 848#ifdef BG_IMAGE_FROM_FILE
830 if (rs[Rs_backgroundPixmap]) 849 if (rs[Rs_backgroundPixmap])
831 { 850 {
832 const char *p = rs[Rs_backgroundPixmap];
833
834 if ((p = strchr (p, ';')) != 0)
835 {
836 p++;
837 bg_set_geometry (p);
838 }
839 else
840 bg_set_default_geometry ();
841
842 if (bg_set_file (rs[Rs_backgroundPixmap])) 851 if (bg_set_file (rs[Rs_backgroundPixmap]))
843 if (!bg_window_position_sensitive ()) 852 if (!bg_window_position_sensitive ())
844 update_background (); 853 update_background ();
845 } 854 }
846#endif 855#endif
870 XChangeProperty (dpy, parent, xa[XA_XEMBED_INFO], xa[XA_XEMBED_INFO], 879 XChangeProperty (dpy, parent, xa[XA_XEMBED_INFO], xa[XA_XEMBED_INFO],
871 32, PropModeReplace, (unsigned char *)&info, 2); 880 32, PropModeReplace, (unsigned char *)&info, 2);
872 } 881 }
873#endif 882#endif
874 883
884#if HAVE_STARTUP_NOTIFICATION
885 SnDisplay *snDisplay;
886 SnLauncheeContext *snContext;
887
888 snDisplay = sn_display_new (dpy, NULL, NULL);
889 snContext = sn_launchee_context_new_from_environment (snDisplay, DefaultScreen (dpy));
890
891 /* Tell the window manager that this window is part of the startup context */
892 if (snContext)
893 sn_launchee_context_setup_window (snContext, parent);
894#endif
895
875 XMapWindow (dpy, vt); 896 XMapWindow (dpy, vt);
876 XMapWindow (dpy, parent); 897 XMapWindow (dpy, parent);
898
899#if HAVE_STARTUP_NOTIFICATION
900 if (snContext)
901 {
902 /* Mark the startup process as complete */
903 sn_launchee_context_complete (snContext);
904
905 sn_launchee_context_unref (snContext);
906 }
907
908 sn_display_unref (snDisplay);
909#endif
877 910
878 refresh_check (); 911 refresh_check ();
879} 912}
880 913
881/*----------------------------------------------------------------------*/ 914/*----------------------------------------------------------------------*/

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines