--- rxvt-unicode/src/init.C 2012/05/31 05:53:46 1.325 +++ rxvt-unicode/src/init.C 2014/09/03 18:20:37 1.336 @@ -16,7 +16,7 @@ * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or + * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, @@ -521,7 +521,7 @@ #ifdef RXVT_SCROLLBAR COLOR_SCROLLTROUGH, #endif -#if ENABLE_TRANSPARENCY +#if BG_IMAGE_FROM_ROOT NULL, #endif #if OFF_FOCUS_FADING @@ -590,9 +590,11 @@ set (display); extract_resources (); -#if XFT - if (rs[Rs_depth]) - select_visual (strtol (rs[Rs_depth], 0, 0)); +#if ENABLE_FRILLS + if (rs[Rs_visual]) + select_visual (strtol (rs[Rs_visual], 0, 0)); + else if (rs[Rs_depth]) + select_depth (strtol (rs[Rs_depth], 0, 0)); #endif for (int i = NUM_RESOURCES; i--; ) @@ -612,8 +614,6 @@ } #endif - // must be called after initialising the perl interpreter as it - // may invoke the `on_register_command' hook extract_keysym_resources (); /* @@ -660,6 +660,13 @@ pointerBlankDelay = 2; #endif + if (rs[Rs_multiClickTime] && (i = atoi (rs[Rs_multiClickTime])) >= 0) + multiClickTime = i; + else + multiClickTime = 500; + + cursor_type = option (Opt_cursorUnderline) ? 1 : 0; + /* no point having a scrollbar without having any scrollback! */ if (!saveLines) set_option (Opt_scrollBar, 0); @@ -793,11 +800,6 @@ pty = ptytty::create (); - // must be called before create_windows, because the latter may call set_icon -#ifdef HAVE_PIXBUF - g_type_init (); -#endif - create_windows (argc, argv); init_xlocale (); @@ -810,30 +812,9 @@ if (option (Opt_scrollBar)) scrollBar.resize (); /* create and map scrollbar */ -#ifdef HAVE_BG_PIXMAP - { - bg_init (); - -#ifdef ENABLE_TRANSPARENCY - if (option (Opt_transparent)) - { - bg_set_transparent (); - - if (rs [Rs_blurradius]) - root_effects.set_blur (rs [Rs_blurradius]); - - if (ISSET_PIXCOLOR (Color_tint)) - root_effects.set_tint (pix_colors_focused [Color_tint]); - if (rs [Rs_shade]) - root_effects.set_shade (rs [Rs_shade]); - - bg_set_root_pixmap (); - XSelectInput (dpy, display->root, PropertyChangeMask); - rootwin_ev.start (display, display->root); - } -#endif - } +#ifdef HAVE_BG_PIXMAP + bg_init (); #endif #if ENABLE_PERL @@ -1011,7 +992,7 @@ { set_environ (envv); -#ifdef USE_XIM +#if USE_XIM if (!locale) rxvt_warn ("setting locale failed, continuing without locale support.\n"); else @@ -1284,7 +1265,7 @@ void rxvt_term::set_icon (const char *file) { -#ifdef HAVE_PIXBUF +#if HAVE_PIXBUF GdkPixbuf *pixbuf = gdk_pixbuf_new_from_file (file, NULL); if (!pixbuf) { @@ -1422,7 +1403,9 @@ wmHint.flags = InputHint | StateHint | WindowGroupHint; wmHint.input = True; - wmHint.initial_state = option (Opt_iconic) ? IconicState : NormalState; + wmHint.initial_state = option (Opt_iconic) ? IconicState + : option (Opt_dockapp) ? WithdrawnState + : NormalState; wmHint.window_group = top; XmbSetWMProperties (dpy, top, NULL, NULL, (char **)argv, argc, @@ -1434,9 +1417,7 @@ */ if (rs [Rs_iconfile]) - { - set_icon (rs [Rs_iconfile]); - } + set_icon (rs [Rs_iconfile]); #endif #if ENABLE_FRILLS