… | |
… | |
791 | if (option (Opt_scrollBar)) |
791 | if (option (Opt_scrollBar)) |
792 | scrollBar.state = SB_STATE_IDLE; /* set existence for size calculations */ |
792 | scrollBar.state = SB_STATE_IDLE; /* set existence for size calculations */ |
793 | |
793 | |
794 | pty = ptytty::create (); |
794 | pty = ptytty::create (); |
795 | |
795 | |
796 | // must be called before create_windows, because the latter may call set_icon |
|
|
797 | #ifdef HAVE_PIXBUF |
|
|
798 | g_type_init (); |
|
|
799 | #endif |
|
|
800 | |
|
|
801 | create_windows (argc, argv); |
796 | create_windows (argc, argv); |
802 | |
797 | |
803 | init_xlocale (); |
798 | init_xlocale (); |
804 | |
799 | |
805 | scr_poweron (); // initialize screen |
800 | scr_poweron (); // initialize screen |
… | |
… | |
812 | scrollBar.resize (); /* create and map scrollbar */ |
807 | scrollBar.resize (); /* create and map scrollbar */ |
813 | #ifdef HAVE_BG_PIXMAP |
808 | #ifdef HAVE_BG_PIXMAP |
814 | { |
809 | { |
815 | bg_init (); |
810 | bg_init (); |
816 | |
811 | |
817 | #ifdef ENABLE_TRANSPARENCY |
812 | #if ENABLE_TRANSPARENCY |
818 | if (option (Opt_transparent)) |
813 | if (option (Opt_transparent)) |
819 | { |
814 | { |
820 | bg_set_transparent (); |
815 | bg_set_transparent (); |
821 | |
816 | |
822 | if (rs [Rs_blurradius]) |
817 | if (rs [Rs_blurradius]) |
823 | bg_set_blur (rs [Rs_blurradius]); |
818 | root_effects.set_blur (rs [Rs_blurradius]); |
824 | |
819 | |
825 | if (ISSET_PIXCOLOR (Color_tint)) |
820 | if (ISSET_PIXCOLOR (Color_tint)) |
826 | bg_set_tint (pix_colors_focused [Color_tint]); |
821 | root_effects.set_tint (pix_colors_focused [Color_tint]); |
827 | |
822 | |
828 | if (rs [Rs_shade]) |
823 | if (rs [Rs_shade]) |
829 | bg_set_shade (rs [Rs_shade]); |
824 | root_effects.set_shade (rs [Rs_shade]); |
830 | |
825 | |
831 | bg_set_root_pixmap (); |
826 | bg_set_root_pixmap (); |
832 | XSelectInput (dpy, display->root, PropertyChangeMask); |
827 | XSelectInput (dpy, display->root, PropertyChangeMask); |
833 | rootwin_ev.start (display, display->root); |
828 | rootwin_ev.start (display, display->root); |
834 | } |
829 | } |
… | |
… | |
1009 | void |
1004 | void |
1010 | rxvt_term::init_xlocale () |
1005 | rxvt_term::init_xlocale () |
1011 | { |
1006 | { |
1012 | set_environ (envv); |
1007 | set_environ (envv); |
1013 | |
1008 | |
1014 | #ifdef USE_XIM |
1009 | #if USE_XIM |
1015 | if (!locale) |
1010 | if (!locale) |
1016 | rxvt_warn ("setting locale failed, continuing without locale support.\n"); |
1011 | rxvt_warn ("setting locale failed, continuing without locale support.\n"); |
1017 | else |
1012 | else |
1018 | { |
1013 | { |
1019 | set_string_property (xa[XA_WM_LOCALE_NAME], locale); |
1014 | set_string_property (xa[XA_WM_LOCALE_NAME], locale); |
… | |
… | |
1282 | } |
1277 | } |
1283 | |
1278 | |
1284 | void |
1279 | void |
1285 | rxvt_term::set_icon (const char *file) |
1280 | rxvt_term::set_icon (const char *file) |
1286 | { |
1281 | { |
1287 | #ifdef HAVE_PIXBUF |
1282 | #if HAVE_PIXBUF |
1288 | GdkPixbuf *pixbuf = gdk_pixbuf_new_from_file (file, NULL); |
1283 | GdkPixbuf *pixbuf = gdk_pixbuf_new_from_file (file, NULL); |
1289 | if (!pixbuf) |
1284 | if (!pixbuf) |
1290 | { |
1285 | { |
1291 | rxvt_warn ("Loading image icon failed, continuing without.\n"); |
1286 | rxvt_warn ("Loading image icon failed, continuing without.\n"); |
1292 | return; |
1287 | return; |