stop blink callback when not required
authorroot <root>
Tue, 11 Dec 2007 21:10:46 +0000 (21:10 +0000)
committerroot <root>
Tue, 11 Dec 2007 21:10:46 +0000 (21:10 +0000)
src/command.C
src/main.C

index 9209b68..0ca537c 100644 (file)
@@ -1081,6 +1081,8 @@ rxvt_term::text_blink_cb (ev::timer &w, int revents)
       hidden_text = !hidden_text;
       want_refresh = 1;
     }
+  else
+    w.stop ();
 }
 #endif
 
@@ -1687,7 +1689,7 @@ rxvt_term::focus_in ()
 #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])
index 3f6697b..8c755f6 100644 (file)
@@ -157,7 +157,7 @@ rxvt_term::rxvt_term ()
   update_background_ev.set<rxvt_term, &rxvt_term::update_background_cb> (this);
 #endif
 #ifdef CURSOR_BLINK
-  cursor_blink_ev.set     <rxvt_term, &rxvt_term::cursor_blink_cb> (this);
+  cursor_blink_ev.set     <rxvt_term, &rxvt_term::cursor_blink_cb> (this); cursor_blink_ev.set (0., CURSOR_BLINK_INTERVAL);
 #endif
 #ifdef TEXT_BLINK
   text_blink_ev.set       <rxvt_term, &rxvt_term::text_blink_cb>   (this); text_blink_ev.set (0., TEXT_BLINK_INTERVAL);