--- rxvt-unicode/src/main.C 2004/05/09 18:19:49 1.67 +++ rxvt-unicode/src/main.C 2004/08/04 03:29:28 1.76 @@ -157,6 +157,15 @@ #ifdef TEXT_BLINK text_blink_ev (this, &rxvt_term::text_blink_cb), #endif +#ifndef NO_SCROLLBAR_BUTTON_CONTINUAL_SCROLLING + cont_scroll_ev (this, &rxvt_term::cont_scroll_cb), +#endif +#ifdef SELECTION_SCROLLING + sel_scroll_ev (this, &rxvt_term::sel_scroll_cb), +#endif +#if defined(MOUSE_WHEEL) && defined(MOUSE_SLIP_WHEELING) + slip_wheel_ev (this, &rxvt_term::slip_wheel_cb), +#endif #ifdef POINTER_BLANK pointer_ev (this, &rxvt_term::pointer_cb), #endif @@ -164,6 +173,7 @@ im_ev (this, &rxvt_term::im_cb), #endif check_ev (this, &rxvt_term::check_cb), + flush_ev (this, &rxvt_term::flush_cb), destroy_ev (this, &rxvt_term::destroy_cb), pty_ev (this, &rxvt_term::pty_cb), incr_ev (this, &rxvt_term::incr_cb) @@ -235,7 +245,10 @@ // TODO: free pixcolours, colours should become part of rxvt_display - delete PixColors; + delete PixColorsFocused; +#ifdef OFF_FOCUS_FADING + delete PixColorsUnFocused; +#endif displays.put (display); @@ -288,6 +301,12 @@ #ifdef TEXT_BLINK text_blink_ev.stop (); #endif +#ifndef NO_SCROLLBAR_BUTTON_CONTINUAL_SCROLLING + cont_scroll_ev.stop (); +#endif +#ifdef SELECTION_SCROLLING + sel_scroll_ev.stop (); +#endif #ifdef POINTER_BLANK pointer_ev.stop (); #endif @@ -742,21 +761,21 @@ szHint.base_width = szHint.base_height = 2 * TermWin.int_bwidth; sb_w = mb_h = 0; - window_vt_x = window_vt_y = 0; + window_vt_x = window_vt_y = TermWin.int_bwidth; if (scrollbar_visible ()) { sb_w = scrollbar_TotalWidth (); szHint.base_width += sb_w; - if (! (Options & Opt_scrollBar_right)) - window_vt_x = sb_w; + if (!(Options & Opt_scrollBar_right)) + window_vt_x += sb_w; } if (menubar_visible ()) { mb_h = menuBar_TotalHeight (); szHint.base_height += mb_h; - window_vt_y = mb_h; + window_vt_y += mb_h; } szHint.width_inc = TermWin.fwidth; @@ -870,6 +889,9 @@ scr_touch (true); } + for (unicode_t ch = 0x20; ch <= 0x7f; ch++) + TermWin.ascii_map [ch - 0x20] = fs->find_font (ch); + return true; } } @@ -942,7 +964,7 @@ { /* bright colors */ i -= 8; # ifndef NO_BRIGHTCOLOR - PixColors[idx] = PixColors[minBrightCOLOR + i]; + PixColorsFocused[idx] = PixColorsFocused[minBrightCOLOR + i]; SET_PIXCOLOR (idx); goto Done; # endif @@ -950,7 +972,7 @@ } if (i >= 0 && i <= 7) { /* normal colors */ - PixColors[idx] = PixColors[minCOLOR + i]; + PixColorsFocused[idx] = PixColorsFocused[minCOLOR + i]; SET_PIXCOLOR (idx); goto Done; } @@ -959,7 +981,7 @@ if (!rXParseAllocColor (& xcol, color)) return; - /* XStoreColor (display->display, XCMAP, XColor*); */ + /* XStoreColor (display->display, display->cmap, XColor*); */ /* * FIXME: should free colors here, but no idea how to do it so instead, @@ -972,20 +994,22 @@ if (i > Color_White) { /* fprintf (stderr, "XFreeColors: PixColors [%d] = %lu\n", idx, PixColors [idx]); */ - XFreeColors (display->display, XCMAP, (PixColors + idx), 1, + XFreeColors (display->display, display->cmap, (PixColors + idx), 1, DisplayPlanes (display->display, display->screen)); } # endif - PixColors[idx] = xcol; + PixColorsFocused[idx] = xcol; SET_PIXCOLOR (idx); /* XSetWindowAttributes attr; */ /* Cursor cursor; */ Done: +#ifdef OFF_FOCUS_FADING + PixColorsUnFocused[idx] = PixColorsFocused[idx].fade (display, atoi (rs[Rs_fade])); +#endif if (idx == Color_bg && ! (Options & Opt_transparent)) - XSetWindowBackground (display->display, TermWin.vt, - PixColors[Color_bg]); + XSetWindowBackground (display->display, TermWin.vt, PixColors[Color_bg]); /* handle Color_BD, scrollbar background, etc. */ @@ -1003,9 +1027,9 @@ { XColor xcol[2]; - xcol[0].pixel = ISSET_PIXCOLOR (Color_pointer_fg) ? PixColors[Color_pointer_fg] : PixColors[Color_fg]; - xcol[1].pixel = ISSET_PIXCOLOR (Color_pointer_bg) ? PixColors[Color_pointer_bg] : PixColors[Color_bg]; - XQueryColors (display->display, XCMAP, xcol, 2); + xcol[0].pixel = ISSET_PIXCOLOR (Color_pointer_fg) ? PixColorsFocused[Color_pointer_fg] : PixColorsFocused[Color_fg]; + xcol[1].pixel = ISSET_PIXCOLOR (Color_pointer_bg) ? PixColorsFocused[Color_pointer_bg] : PixColorsFocused[Color_bg]; + XQueryColors (display->display, display->cmap, xcol, 2); XRecolorCursor (display->display, TermWin_cursor, xcol + 0, xcol + 1); }