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 9209b68e2ea811c2c80ecc13c6ca43aefa802b2e..0ca537c62c803d2109be19b39b5dfcf98bfbe044 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 3f6697b6dcc7692d10430e5985c167f082028486..8c755f6f4de6974e02eb99810faef82880693513 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);