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.296 by sf-exg, Mon May 30 18:39:03 2011 UTC vs.
Revision 1.301 by mikachu, Sun Nov 13 16:03:31 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>
627 632
628 for (int i = NUM_RESOURCES; i--; ) 633 for (int i = NUM_RESOURCES; i--; )
629 if (rs [i] == resval_undef) 634 if (rs [i] == resval_undef)
630 rs [i] = 0; 635 rs [i] = 0;
631 636
632#ifdef HAVE_AFTERIMAGE
633 set_application_name ((char *)rs[Rs_name]);
634 set_output_threshold (OUTPUT_LEVEL_WARNING);
635#endif
636
637#ifdef HAVE_PIXBUF
638 g_type_init ();
639#endif
640
641#if ENABLE_PERL 637#if ENABLE_PERL
642 if (!rs[Rs_perl_ext_1]) 638 if (!rs[Rs_perl_ext_1])
643 rs[Rs_perl_ext_1] = "default"; 639 rs[Rs_perl_ext_1] = "default";
644 640
645 if ((rs[Rs_perl_ext_1] && *rs[Rs_perl_ext_1]) 641 if ((rs[Rs_perl_ext_1] && *rs[Rs_perl_ext_1])
793 if (chdir (path)) 789 if (chdir (path))
794 rxvt_fatal ("unable to change into specified shell working directory, aborting.\n"); 790 rxvt_fatal ("unable to change into specified shell working directory, aborting.\n");
795 } 791 }
796 792
797 if (option (Opt_scrollBar)) 793 if (option (Opt_scrollBar))
798 scrollBar.state = STATE_IDLE; /* set existence for size calculations */ 794 scrollBar.state = SB_STATE_IDLE; /* set existence for size calculations */
799 795
800 pty = ptytty::create (); 796 pty = ptytty::create ();
797
798#ifdef HAVE_AFTERIMAGE
799 set_application_name ((char *)rs[Rs_name]);
800 set_output_threshold (OUTPUT_LEVEL_WARNING);
801#endif
802
803 // must be called before create_windows, because the latter may call set_icon
804#ifdef HAVE_PIXBUF
805 g_type_init ();
806#endif
801 807
802 create_windows (argc, argv); 808 create_windows (argc, argv);
803 809
804 init_xlocale (); 810 init_xlocale ();
805 811
836#endif 842#endif
837 843
838#ifdef BG_IMAGE_FROM_FILE 844#ifdef BG_IMAGE_FROM_FILE
839 if (rs[Rs_backgroundPixmap]) 845 if (rs[Rs_backgroundPixmap])
840 { 846 {
841 const char *p = rs[Rs_backgroundPixmap];
842
843 if ((p = strchr (p, ';')) != 0)
844 {
845 p++;
846 bg_set_geometry (p);
847 }
848 else
849 bg_set_default_geometry ();
850
851 if (bg_set_file (rs[Rs_backgroundPixmap])) 847 if (bg_set_file (rs[Rs_backgroundPixmap]))
852 if (!bg_window_position_sensitive ()) 848 if (!bg_window_position_sensitive ())
853 update_background (); 849 update_background ();
854 } 850 }
855#endif 851#endif
879 XChangeProperty (dpy, parent, xa[XA_XEMBED_INFO], xa[XA_XEMBED_INFO], 875 XChangeProperty (dpy, parent, xa[XA_XEMBED_INFO], xa[XA_XEMBED_INFO],
880 32, PropModeReplace, (unsigned char *)&info, 2); 876 32, PropModeReplace, (unsigned char *)&info, 2);
881 } 877 }
882#endif 878#endif
883 879
880#if HAVE_STARTUP_NOTIFICATION
881 SnDisplay *snDisplay;
882 SnLauncheeContext *snContext;
883
884 snDisplay = sn_display_new (dpy, NULL, NULL);
885 snContext = sn_launchee_context_new_from_environment (snDisplay, DefaultScreen (dpy));
886
887 /* Tell the window manager that this window is part of the startup context */
888 if (snContext)
889 sn_launchee_context_setup_window (snContext, parent);
890#endif
891
884 XMapWindow (dpy, vt); 892 XMapWindow (dpy, vt);
885 XMapWindow (dpy, parent); 893 XMapWindow (dpy, parent);
894
895#if HAVE_STARTUP_NOTIFICATION
896 if (snContext)
897 {
898 /* Mark the startup process as complete */
899 sn_launchee_context_complete (snContext);
900
901 sn_launchee_context_unref (snContext);
902 }
903
904 sn_display_unref (snDisplay);
905#endif
886 906
887 refresh_check (); 907 refresh_check ();
888} 908}
889 909
890/*----------------------------------------------------------------------*/ 910/*----------------------------------------------------------------------*/

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines