… | |
… | |
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> |
… | |
… | |
605 | rs[Rs_display_name] = ":0"; |
610 | rs[Rs_display_name] = ":0"; |
606 | |
611 | |
607 | get_options (r_argc, r_argv); |
612 | get_options (r_argc, r_argv); |
608 | |
613 | |
609 | if (!(display = displays.get (rs[Rs_display_name]))) |
614 | if (!(display = displays.get (rs[Rs_display_name]))) |
610 | { |
|
|
611 | free (r_argv); |
|
|
612 | rxvt_fatal ("can't open display %s, aborting.\n", rs[Rs_display_name]); |
615 | rxvt_fatal ("can't open display %s, aborting.\n", rs[Rs_display_name]); |
613 | } |
|
|
614 | |
616 | |
615 | // using a local pointer decreases code size a lot |
617 | // using a local pointer decreases code size a lot |
616 | xa = display->xa; |
618 | xa = display->xa; |
617 | |
619 | |
618 | set (display); |
620 | set (display); |
… | |
… | |
639 | { |
641 | { |
640 | rxvt_perl.init (this); |
642 | rxvt_perl.init (this); |
641 | HOOK_INVOKE ((this, HOOK_INIT, DT_END)); |
643 | HOOK_INVOKE ((this, HOOK_INIT, DT_END)); |
642 | } |
644 | } |
643 | #endif |
645 | #endif |
|
|
646 | |
|
|
647 | // must be called after initialising the perl interpreter as it |
|
|
648 | // may invoke the `on_register_command' hook |
|
|
649 | extract_keysym_resources (); |
644 | |
650 | |
645 | /* |
651 | /* |
646 | * set any defaults not already set |
652 | * set any defaults not already set |
647 | */ |
653 | */ |
648 | if (cmd_argv && cmd_argv[0]) |
654 | if (cmd_argv && cmd_argv[0]) |
… | |
… | |
784 | if (chdir (path)) |
790 | if (chdir (path)) |
785 | rxvt_fatal ("unable to change into specified shell working directory, aborting.\n"); |
791 | rxvt_fatal ("unable to change into specified shell working directory, aborting.\n"); |
786 | } |
792 | } |
787 | |
793 | |
788 | if (option (Opt_scrollBar)) |
794 | if (option (Opt_scrollBar)) |
789 | scrollBar.state = STATE_IDLE; /* set existence for size calculations */ |
795 | scrollBar.state = SB_STATE_IDLE; /* set existence for size calculations */ |
790 | |
796 | |
791 | pty = ptytty::create (); |
797 | pty = ptytty::create (); |
792 | |
798 | |
793 | #ifdef HAVE_AFTERIMAGE |
799 | #ifdef HAVE_AFTERIMAGE |
794 | set_application_name ((char *)rs[Rs_name]); |
800 | set_application_name ((char *)rs[Rs_name]); |
… | |
… | |
870 | XChangeProperty (dpy, parent, xa[XA_XEMBED_INFO], xa[XA_XEMBED_INFO], |
876 | XChangeProperty (dpy, parent, xa[XA_XEMBED_INFO], xa[XA_XEMBED_INFO], |
871 | 32, PropModeReplace, (unsigned char *)&info, 2); |
877 | 32, PropModeReplace, (unsigned char *)&info, 2); |
872 | } |
878 | } |
873 | #endif |
879 | #endif |
874 | |
880 | |
|
|
881 | #if HAVE_STARTUP_NOTIFICATION |
|
|
882 | SnDisplay *snDisplay; |
|
|
883 | SnLauncheeContext *snContext; |
|
|
884 | |
|
|
885 | snDisplay = sn_display_new (dpy, NULL, NULL); |
|
|
886 | snContext = sn_launchee_context_new_from_environment (snDisplay, DefaultScreen (dpy)); |
|
|
887 | |
|
|
888 | /* Tell the window manager that this window is part of the startup context */ |
|
|
889 | if (snContext) |
|
|
890 | sn_launchee_context_setup_window (snContext, parent); |
|
|
891 | #endif |
|
|
892 | |
875 | XMapWindow (dpy, vt); |
893 | XMapWindow (dpy, vt); |
876 | XMapWindow (dpy, parent); |
894 | XMapWindow (dpy, parent); |
|
|
895 | |
|
|
896 | #if HAVE_STARTUP_NOTIFICATION |
|
|
897 | if (snContext) |
|
|
898 | { |
|
|
899 | /* Mark the startup process as complete */ |
|
|
900 | sn_launchee_context_complete (snContext); |
|
|
901 | |
|
|
902 | sn_launchee_context_unref (snContext); |
|
|
903 | } |
|
|
904 | |
|
|
905 | sn_display_unref (snDisplay); |
|
|
906 | #endif |
877 | |
907 | |
878 | refresh_check (); |
908 | refresh_check (); |
879 | } |
909 | } |
880 | |
910 | |
881 | /*----------------------------------------------------------------------*/ |
911 | /*----------------------------------------------------------------------*/ |