--- rxvt-unicode/src/command.C 2007/12/05 08:46:30 1.371 +++ rxvt-unicode/src/command.C 2007/12/14 02:29:48 1.379 @@ -27,7 +27,7 @@ * Copyright (c) 2001 Marius Gedminas * - Ctrl/Mod4+Tab works like Meta+Tab (options) * Copyright (c) 2003 Rob McMullen - * Copyright (c) 2003-2006 Marc Lehmann + * Copyright (c) 2003-2007 Marc Lehmann * * 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 @@ -1050,7 +1050,7 @@ display->flush (); - if (want_refresh && !flush_ev.active) + if (want_refresh && !flush_ev.is_active ()) flush_ev.start (1. / 60.); // refresh at max. 60 Hz normally } @@ -1081,6 +1081,8 @@ hidden_text = !hidden_text; want_refresh = 1; } + else + w.stop (); } #endif @@ -1114,17 +1116,14 @@ void rxvt_term::slip_wheel_cb (ev::timer &w, int revents) { - if (mouse_slip_wheel_speed == 0 - || mouse_slip_wheel_speed < 0 ? scr_page (DN, -mouse_slip_wheel_speed) - : scr_page (UP, mouse_slip_wheel_speed)) - { - if (view_start == top_row || view_start == 0) - mouse_slip_wheel_speed = 0; + if (scr_page (mouse_slip_wheel_speed < 0 ? DN : UP, abs (mouse_slip_wheel_speed))) + want_refresh = 1; - want_refresh = 1; + if (view_start == top_row || view_start == 0 || mouse_slip_wheel_speed == 0) + { + mouse_slip_wheel_speed = 0; + w.stop (); } - else - w.stop (); } #endif @@ -1478,7 +1477,7 @@ case MapNotify: mapped = 1; #ifdef TEXT_BLINK - text_blink_ev.start (TEXT_BLINK_INTERVAL); + text_blink_ev.start (); #endif HOOK_INVOKE ((this, HOOK_MAP_NOTIFY, DT_XEVENT, &ev, DT_END)); break; @@ -1579,7 +1578,7 @@ /* don't clobber the current delay if we are * already in the middle of scrolling. */ - if (!sel_scroll_ev.active) + if (!sel_scroll_ev.is_active ()) sel_scroll_ev.start (SCROLLBAR_INITIAL_DELAY, SCROLLBAR_CONTINUOUS_DELAY); /* save the event params so we can highlight @@ -1612,8 +1611,7 @@ /* we are within the text window, so we * shouldn't be scrolling */ - if (sel_scroll_ev.active) - sel_scroll_ev.stop(); + sel_scroll_ev.stop(); } #endif #ifdef MOUSE_THRESHOLD @@ -1687,7 +1685,7 @@ #endif #if CURSOR_BLINK if (option (Opt_cursorBlink)) - cursor_blink_ev.start (CURSOR_BLINK_INTERVAL, CURSOR_BLINK_INTERVAL); + cursor_blink_ev.again (); #endif #if OFF_FOCUS_FADING if (rs[Rs_fade]) @@ -1975,10 +1973,12 @@ else if (scrollbarrxvt_dnButton (ev.y)) upordown = 1; /* down */ } + if (upordown) { #ifndef NO_SCROLLBAR_BUTTON_CONTINUAL_SCROLLING - cont_scroll_ev.start (SCROLLBAR_INITIAL_DELAY, SCROLLBAR_CONTINUOUS_DELAY); + if (!cont_scroll_ev.is_active ()) + cont_scroll_ev.start (SCROLLBAR_INITIAL_DELAY, SCROLLBAR_CONTINUOUS_DELAY); #endif if (scr_page (upordown < 0 ? UP : DN, 1)) { @@ -2068,8 +2068,7 @@ } #ifdef SELECTION_SCROLLING - if (sel_scroll_ev.active) - sel_scroll_ev.stop(); + sel_scroll_ev.stop(); #endif if (ev.window == vt) @@ -2151,7 +2150,8 @@ if (mouse_slip_wheel_speed < -nrow) mouse_slip_wheel_speed = -nrow; if (mouse_slip_wheel_speed > +nrow) mouse_slip_wheel_speed = +nrow; - slip_wheel_ev.start (SCROLLBAR_CONTINUOUS_DELAY, SCROLLBAR_CONTINUOUS_DELAY); + if (!slip_wheel_ev.is_active ()) + slip_wheel_ev.start (SCROLLBAR_CONTINUOUS_DELAY, SCROLLBAR_CONTINUOUS_DELAY); } else {