--- rxvt-unicode/src/command.C 2007/06/11 17:40:15 1.328 +++ rxvt-unicode/src/command.C 2007/06/30 18:10:41 1.336 @@ -538,7 +538,7 @@ # endif } #endif - + #ifdef PRINTPIPE if (keysym == XK_Print) { @@ -1037,7 +1037,7 @@ { flush_ev.stop (); -#ifdef TRANSPARENT +#ifdef ENABLE_TRANSPARENCY if (want_full_refresh) { want_full_refresh = 0; @@ -1112,7 +1112,6 @@ { make_current (); - refresh_limit = 1; refresh_count = 0; flush (); } @@ -1188,7 +1187,7 @@ static struct event_handler { check_watcher yield_ev; - + void yield_cb (check_watcher &w) { // this should really be sched_yield(), but the linux guys thought @@ -1245,7 +1244,7 @@ if (!option (Opt_hold)) destroy (); } - + return false; } @@ -1438,10 +1437,6 @@ } break; - case MappingNotify: - XRefreshKeyboardMapping (&ev.xmapping); - break; - /* * XXX: this is not the _current_ arrangement * Here's my conclusion: @@ -1492,17 +1487,17 @@ seen_resize = 1; resize_all_windows (ev.xconfigure.width, ev.xconfigure.height, 1); #ifdef XPM_BACKGROUND - if (!option(Opt_transparent) && bgPixmap.auto_resize) + if (!option (Opt_transparent) && bgPixmap.auto_resize) { resize_pixmap (); scr_touch (true); - } + } #endif } HOOK_INVOKE ((this, HOOK_CONFIGURE_NOTIFY, DT_XEVENT, &ev, DT_END)); -#ifdef TRANSPARENT +#ifdef ENABLE_TRANSPARENCY if (option (Opt_transparent)) check_our_parents (); #endif @@ -1546,11 +1541,11 @@ HOOK_INVOKE ((this, HOOK_UNMAP_NOTIFY, DT_XEVENT, &ev, DT_END)); break; -#ifdef TRANSPARENT +#ifdef ENABLE_TRANSPARENCY case ReparentNotify: rootwin_cb (ev); break; -#endif /* TRANSPARENT */ +#endif /* ENABLE_TRANSPARENCY */ case GraphicsExpose: case Expose: @@ -1584,7 +1579,7 @@ scrollbar_show (0); } -#ifdef TRANSPARENT +#ifdef ENABLE_TRANSPARENCY if (am_transparent && ev.xany.window == parent[0]) XClearWindow (dpy, ev.xany.window); #endif @@ -1695,7 +1690,6 @@ scr_move_to (scrollbar_position (ev.xbutton.y) - csrO, scrollbar_size ()); want_refresh = 1; - refresh_limit = 0; scrollbar_show (1); } break; @@ -1824,7 +1818,7 @@ #endif } -#if TRANSPARENT || ENABLE_PERL +#if ENABLE_TRANSPARENCY || ENABLE_PERL void rxvt_term::rootwin_cb (XEvent &ev) { @@ -1834,7 +1828,7 @@ && HOOK_INVOKE ((this, HOOK_ROOT_EVENT, DT_XEVENT, &ev, DT_END))) return; -# if TRANSPARENT +# if ENABLE_TRANSPARENCY switch (ev.type) { case PropertyNotify: @@ -2293,13 +2287,16 @@ refresh_count++; - if (!option (Opt_jumpScroll) - || (refresh_count >= refresh_limit * (nrow - 1))) + if (!option (Opt_jumpScroll) || refresh_count >= nrow - 1) { - refreshnow = true; refresh_count = 0; - ch = NOCHAR; - break; + + if (!option (Opt_skipScroll) || io_manager::now () > NOW + 1. / 60.) + { + refreshnow = true; + ch = NOCHAR; + break; + } } // scr_add_lines only works for nlines <= nrow - 1. @@ -2337,21 +2334,14 @@ /* * If there have been a lot of new lines, then update the screen - * What the heck I'll cheat and only refresh less than every page-full. - * the number of pages between refreshes is refresh_limit, which - * is incremented here because we must be doing flat-out scrolling. + * What the heck we'll cheat and only refresh less than every page-full. + * if skipScroll is enabled. */ if (refreshnow) { - if (option (Opt_jumpScroll) && refresh_limit < REFRESH_PERIOD) - refresh_limit++; - else - { - flag = true; - //TODO: due to popular request, implement "skipscroll" option here - scr_refresh (); - want_refresh = 1; - } + flag = true; + scr_refresh (); + want_refresh = 1; } } @@ -2510,7 +2500,7 @@ break; /* done = 1 */ } } - + for (i = 0; i < len; i++) if (putc (buf[i], fd) == EOF) { @@ -2582,7 +2572,7 @@ case 0x9b: /* CSI */ process_csi_seq (); break; - case 0x9d: /* CSI */ + case 0x9d: /* OSC */ process_osc_seq (); break; #endif @@ -2820,8 +2810,8 @@ int n, ndef; int arg[ESC_ARGS]; - for (nargs = ESC_ARGS; nargs > 0;) - arg[--nargs] = 0; + memset (arg, 0, sizeof (arg)); + nargs = 0; priv = 0; ch = cmd_getc (); @@ -2875,7 +2865,7 @@ case '>': if (ch == CSI_DA) /* secondary device attributes */ { - // first parameter is normally 0 for vt100, 1 for some newer vtxxx, 'R' for rxvt, + // first parameter is normally 0 for vt100, 1 for vt220, 'R' for rxvt, // 'U' for rxvt-unicode != 7.[34] (where it was broken). // // second parameter is xterm patch level for xterm, MMmmpp (e.g. 20703) for rxvt @@ -3338,7 +3328,7 @@ dLocal (Display *, dpy); assert (str != NULL); - + if (HOOK_INVOKE ((this, HOOK_OSC_SEQ, DT_INT, op, DT_STR, str, DT_END))) return; @@ -3443,7 +3433,7 @@ process_color_seq (op, Color_IT, str, resp); break; #endif -#if TRANSPARENT && TINTING +#if ENABLE_TRANSPARENCY && TINTING case URxvt_Color_tint: process_color_seq (op, Color_tint, str, resp); @@ -3483,11 +3473,10 @@ scr_touch (true); #endif } -#if TRANSPARENT && defined(HAVE_AFTERIMAGE) - if (option(Opt_transparent)) - check_our_parents (); -#endif - +#if ENABLE_TRANSPARENCY && defined(HAVE_AFTERIMAGE) + if (option (Opt_transparent)) + check_our_parents (); +#endif } break;