--- rxvt-unicode/src/init.C 2007/01/20 12:29:35 1.179 +++ rxvt-unicode/src/init.C 2007/07/24 14:38:59 1.192 @@ -1,4 +1,4 @@ -/*----------------------------------------------------------------------* + /*----------------------------------------------------------------------* * File: init.C *----------------------------------------------------------------------* * @@ -48,7 +48,7 @@ "rgb:00/00/00", // 0: black (Black) "rgb:cd/00/00", // 1: red (Red3) "rgb:00/cd/00", // 2: green (Green3) - "rgb:cd/cd/00", // 3: ywlloe (Yellow3) + "rgb:cd/cd/00", // 3: yellow (Yellow3) "rgb:00/00/cd", // 4: blue (Blue3) "rgb:cd/00/cd", // 5: magenta (Magenta3) "rgb:00/cd/cd", // 6: cyan (Cyan3) @@ -185,13 +185,12 @@ pix_colors_unfocused = new rxvt_color [TOTAL_COLORS]; #endif -#if defined(XPM_BACKGROUND) || defined(TRANSPARENT) +#if defined(XPM_BACKGROUND) || defined(ENABLE_TRANSPARENCY) pixmap = None; #endif MEvent.time = CurrentTime; MEvent.button = AnyButton; - options = DEFAULT_OPTIONS; want_refresh = 1; priv_modes = SavedModes = PrivMode_Default; ncol = 80; @@ -202,18 +201,27 @@ saveLines = SAVELINES; numpix_colors = TOTAL_COLORS; - refresh_limit = 1; refresh_type = SLOW_REFRESH; oldcursor.row = oldcursor.col = -1; #ifdef XPM_BACKGROUND /* bgPixmap.w = bgPixmap.h = 0; */ - bgPixmap.x = bgPixmap.y = 50; + bgPixmap.x = bgPixmap.y = 0; bgPixmap.pixmap = None; #endif last_bot = last_state = -1; + set_option (Opt_scrollBar); + set_option (Opt_scrollTtyOutput); + set_option (Opt_jumpScroll); + set_option (Opt_skipScroll); + set_option (Opt_secondaryScreen); + set_option (Opt_secondaryScroll); + set_option (Opt_pastableTabs); + set_option (Opt_intensityStyles); + set_option (Opt_iso14755_52); + return true; } @@ -310,6 +318,11 @@ select_visual (strtol (rs[Rs_depth], 0, 0)); #endif +#ifdef HAVE_AFTERIMAGE + //TODO: is this neccessary for future versions who check the global var whern the macro doesn'T set it? + ::dpy = NULL ; /* init global var from libAfter... */ + asv = AFTERIMAGE_DPY_OP (create_asvisual_for_id (dpy, display->screen, depth, XVisualIDFromVisual (visual), cmap, NULL)); +#endif free (r_argv); for (int i = NUM_RESOURCES; i--; ) @@ -423,7 +436,7 @@ #ifdef XTERM_REVERSE_VIDEO /* this is how xterm implements reverseVideo */ - if (OPTION (Opt_reverseVideo)) + if (option (Opt_reverseVideo)) { if (!rs[Rs_color + Color_fg]) rs[Rs_color + Color_fg] = def_colorName[Color_bg]; @@ -439,7 +452,7 @@ #ifndef XTERM_REVERSE_VIDEO /* this is how we implement reverseVideo */ - if (OPTION (Opt_reverseVideo)) + if (option (Opt_reverseVideo)) ::swap (rs[Rs_color + Color_fg], rs[Rs_color + Color_bg]); #endif @@ -623,16 +636,16 @@ */ #ifdef META8_OPTION - meta_char = OPTION (Opt_meta8) ? 0x80 : C0_ESC; + meta_char = option (Opt_meta8) ? 0x80 : C0_ESC; #endif get_ourmods (); - if (!OPTION (Opt_scrollTtyOutput)) + if (!option (Opt_scrollTtyOutput)) priv_modes |= PrivMode_TtyOutputInh; - if (OPTION (Opt_scrollTtyKeypress)) + if (option (Opt_scrollTtyKeypress)) priv_modes |= PrivMode_Keypress; - if (!OPTION (Opt_jumpScroll)) + if (!option (Opt_jumpScroll)) priv_modes |= PrivMode_smoothScroll; #ifndef NO_BACKSPACE_KEY @@ -672,7 +685,7 @@ if (!set_color (xcol, name)) { #ifndef XTERM_REVERSE_VIDEO - if (i < 2 && OPTION (Opt_reverseVideo)) + if (i < 2 && option (Opt_reverseVideo)) name = def_colorName [1 - i]; else #endif @@ -889,10 +902,10 @@ parent = display->root; - attributes.override_redirect = !!OPTION (Opt_override_redirect); + attributes.override_redirect = !!option (Opt_override_redirect); #if ENABLE_FRILLS - if (OPTION (Opt_borderLess)) + if (option (Opt_borderLess)) { if (XInternAtom (dpy, "_MOTIF_WM_INFO", True) == None) { @@ -952,7 +965,7 @@ wmHint.flags = InputHint | StateHint | WindowGroupHint; wmHint.input = True; - wmHint.initial_state = OPTION (Opt_iconic) ? IconicState : NormalState; + wmHint.initial_state = option (Opt_iconic) ? IconicState : NormalState; wmHint.window_group = top; XmbSetWMProperties (dpy, top, NULL, NULL, (char **)argv, argc, @@ -1019,7 +1032,7 @@ vt_emask = ExposureMask | ButtonPressMask | ButtonReleaseMask | PropertyChangeMask; - if (OPTION (Opt_pointerBlank)) + if (option (Opt_pointerBlank)) vt_emask |= PointerMotionMask; else vt_emask |= Button1MotionMask | Button3MotionMask; @@ -1030,7 +1043,10 @@ #ifdef XPM_BACKGROUND if (rs[Rs_backgroundPixmap] != NULL - && !OPTION (Opt_transparent)) +#ifndef HAVE_AFTERIMAGE + && !option (Opt_transparent) +#endif + ) { const char *p = rs[Rs_backgroundPixmap]; @@ -1324,8 +1340,8 @@ _exit (EXIT_FAILURE); default: - if (!OPTION (Opt_utmpInhibit)) - pty->login (cmd_pid, OPTION (Opt_loginShell), rs[Rs_display_name]); + if (!option (Opt_utmpInhibit)) + pty->login (cmd_pid, option (Opt_loginShell), rs[Rs_display_name]); pty->close_tty (); @@ -1348,7 +1364,7 @@ { char *login; - if (OPTION (Opt_console)) + if (option (Opt_console)) { /* be virtual console, fail silently */ #ifdef TIOCCONS unsigned int on = 1; @@ -1407,7 +1423,7 @@ argv0 = (const char *)rxvt_r_basename (shell); - if (OPTION (Opt_loginShell)) + if (option (Opt_loginShell)) { login = (char *)rxvt_malloc ((strlen (argv0) + 2) * sizeof (char));