… | |
… | |
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> |
… | |
… | |
784 | if (chdir (path)) |
789 | if (chdir (path)) |
785 | 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"); |
786 | } |
791 | } |
787 | |
792 | |
788 | if (option (Opt_scrollBar)) |
793 | if (option (Opt_scrollBar)) |
789 | scrollBar.state = STATE_IDLE; /* set existence for size calculations */ |
794 | scrollBar.state = SB_STATE_IDLE; /* set existence for size calculations */ |
790 | |
795 | |
791 | 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 |
792 | |
807 | |
793 | create_windows (argc, argv); |
808 | create_windows (argc, argv); |
794 | |
809 | |
795 | init_xlocale (); |
810 | init_xlocale (); |
796 | |
811 | |
… | |
… | |
827 | #endif |
842 | #endif |
828 | |
843 | |
829 | #ifdef BG_IMAGE_FROM_FILE |
844 | #ifdef BG_IMAGE_FROM_FILE |
830 | if (rs[Rs_backgroundPixmap]) |
845 | if (rs[Rs_backgroundPixmap]) |
831 | { |
846 | { |
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])) |
847 | if (bg_set_file (rs[Rs_backgroundPixmap])) |
843 | if (!bg_window_position_sensitive ()) |
848 | if (!bg_window_position_sensitive ()) |
844 | update_background (); |
849 | update_background (); |
845 | } |
850 | } |
846 | #endif |
851 | #endif |
… | |
… | |
870 | XChangeProperty (dpy, parent, xa[XA_XEMBED_INFO], xa[XA_XEMBED_INFO], |
875 | XChangeProperty (dpy, parent, xa[XA_XEMBED_INFO], xa[XA_XEMBED_INFO], |
871 | 32, PropModeReplace, (unsigned char *)&info, 2); |
876 | 32, PropModeReplace, (unsigned char *)&info, 2); |
872 | } |
877 | } |
873 | #endif |
878 | #endif |
874 | |
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 | |
875 | XMapWindow (dpy, vt); |
892 | XMapWindow (dpy, vt); |
876 | 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 |
877 | |
906 | |
878 | refresh_check (); |
907 | refresh_check (); |
879 | } |
908 | } |
880 | |
909 | |
881 | /*----------------------------------------------------------------------*/ |
910 | /*----------------------------------------------------------------------*/ |