--- rxvt-unicode/src/command.C 2007/11/12 14:53:13 1.364 +++ rxvt-unicode/src/command.C 2007/12/11 21:10:46 1.375 @@ -1050,8 +1050,8 @@ display->flush (); - if (want_refresh && !flush_ev.active) - flush_ev.start (1. / 60.); // refresh at max. 60 hz normally + if (want_refresh && !ev_is_active (&flush_ev)) + flush_ev.start (1. / 60.); // refresh at max. 60 Hz normally } void @@ -1081,6 +1081,8 @@ hidden_text = !hidden_text; want_refresh = 1; } + else + w.stop (); } #endif @@ -1253,13 +1255,14 @@ x = Pixel2Col (ev.x); y = Pixel2Row (ev.y); - if (ev.type == MotionNotify) { - if (x == mouse_row && y == mouse_col) - return; - mouse_row = x; - mouse_col = y; - code += 32; - } + if (ev.type == MotionNotify) + { + if (x == mouse_row && y == mouse_col) + return; + mouse_row = x; + mouse_col = y; + code += 32; + } if (MEvent.button == AnyButton) button_number = 3; @@ -1477,7 +1480,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; @@ -1578,7 +1581,7 @@ /* don't clobber the current delay if we are * already in the middle of scrolling. */ - if (!sel_scroll_ev.active) + if (!ev_is_active (&sel_scroll_ev)) sel_scroll_ev.start (SCROLLBAR_INITIAL_DELAY, SCROLLBAR_CONTINUOUS_DELAY); /* save the event params so we can highlight @@ -1611,7 +1614,7 @@ /* we are within the text window, so we * shouldn't be scrolling */ - if (sel_scroll_ev.active) + if (ev_is_active (&sel_scroll_ev)) sel_scroll_ev.stop(); } #endif @@ -1686,7 +1689,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]) @@ -1851,7 +1854,7 @@ #else MEvent.button = ev.button; mouse_report (ev); -#endif /* MOUSE_REPORT_DOUBLECLICK */ +#endif /* MOUSE_REPORT_DOUBLECLICK */ } else @@ -1955,10 +1958,10 @@ } } else -#endif /* NO_SCROLLBAR_REPORT */ +#endif /* NO_SCROLLBAR_REPORT */ { - char upordown = 0; + char upordown = 0; if (scrollBar.style == R_SB_NEXT) { @@ -2067,7 +2070,7 @@ } #ifdef SELECTION_SCROLLING - if (sel_scroll_ev.active) + if (ev_is_active (&sel_scroll_ev)) sel_scroll_ev.stop(); #endif @@ -2102,7 +2105,7 @@ #else /* MOUSE_REPORT_DOUBLECLICK */ MEvent.button = AnyButton; mouse_report (ev); -#endif /* MOUSE_REPORT_DOUBLECLICK */ +#endif /* MOUSE_REPORT_DOUBLECLICK */ return; } @@ -2228,7 +2231,7 @@ { refresh_count = 0; - if (!option (Opt_skipScroll) || ev::ev_time () > ev::now () + 1. / 60.) + if (!option (Opt_skipScroll) || ev_time () > ev::now () + 1. / 60.) { refreshnow = true; ch = NOCHAR; @@ -2449,7 +2452,7 @@ pclose_printer (fd); } -#endif /* PRINTPIPE */ +#endif /* PRINTPIPE */ /*}}} */ /* *INDENT-OFF* */ @@ -2752,7 +2755,8 @@ priv = 0; ch = cmd_getc (); if (ch >= '<' && ch <= '?') - { /* '<' '=' '>' '?' */ + { + /* '<' '=' '>' '?' */ priv = ch; ch = cmd_getc (); } @@ -3582,7 +3586,6 @@ { 67, PrivMode_BackSpace }, #endif { 1000, PrivMode_MouseX11 }, - // 1001 Use Hilite Mouse Tracking. NYI, TODO { 1002, PrivMode_MouseBtnEvent }, { 1003, PrivMode_MouseAnyEvent }, { 1010, PrivMode_TtyOutputInh }, // rxvt extension @@ -3693,17 +3696,15 @@ if (state) /* orthogonal */ priv_modes &= ~(PrivMode_MouseX10|PrivMode_MouseBtnEvent|PrivMode_MouseAnyEvent); break; -#if 0 - case 1001: - break; /* X11 mouse highlighting */ -#endif case 1002: case 1003: - if (state) { - priv_modes &= ~(PrivMode_MouseX10|PrivMode_MouseX11); - priv_modes &= arg[i] == 1003 ? ~PrivMode_MouseBtnEvent : ~PrivMode_MouseAnyEvent; - vt_emask_mouse = PointerMotionMask; - } else + if (state) + { + priv_modes &= ~(PrivMode_MouseX10|PrivMode_MouseX11); + priv_modes &= arg[i] == 1003 ? ~PrivMode_MouseBtnEvent : ~PrivMode_MouseAnyEvent; + vt_emask_mouse = PointerMotionMask; + } + else vt_emask_mouse = NoEventMask; vt_select_input (); break; @@ -3893,7 +3894,8 @@ unicode_t ch, cmd = cmd_getc (); if (cmd == 'Q') - { /* query graphics */ + { + /* query graphics */ tt_printf ("\033G0\012"); /* no graphics */ return; }