--enable-wtmp --enable-lastlog --enable-xim --disable-strings --enable-xterm-scroll \
--with-term=xterm --enable-keepscrolling --enable-xft \
--enable-frills --disable-swapscreen \
- --with-codesets=eu,jp
+ --with-codesets=eu,jp \
+ --enable-cursor-blink
#--enable-pointer-blank --enable-cursor-blink
/*--------------------------------*-C-*---------------------------------*
* File: command.c
*----------------------------------------------------------------------*
- * $Id: command.C,v 1.4 2003-11-25 15:25:16 pcg Exp $
+ * $Id: command.C,v 1.5 2003-11-25 15:44:38 pcg Exp $
*
* All portions of code are copyright by their respective author/s.
* Copyright (c) 1992 John Bovey, University of Kent at Canterbury <jdb@ukc.ac.uk>
XEvent xev;
XNextEvent (Xdisplay, &xev);
+
#if defined(CURSOR_BLINK)
if ((Options & Opt_cursorBlink)
&& xev.type == KeyPress) {
hidden_cursor = 0;
want_refresh = 1;
}
- want_keypress_time = 1;
+ blink_ev.start (NOW + BLINK_INTERVAL);
}
#endif
while (XPending (Xdisplay));
}
+void
+rxvt_term::blink_cb (time_watcher &w)
+{
+ w.at += BLINK_INTERVAL;
+ hidden_cursor = !hidden_cursor;
+ want_refresh = 1;
+ flush();
+}
+
void
rxvt_term::x_cb (io_watcher &w, short revents)
{
#ifdef USE_XIM
if (R->Input_Context != NULL)
XSetICFocus(R->Input_Context);
+#endif
+#ifdef CURSOR_BLINK
+ if (R->Options & Opt_cursorBlink)
+ R->blink_ev.start (NOW + BLINK_INTERVAL);
#endif
}
break;
#ifdef USE_XIM
if (R->Input_Context != NULL)
XUnsetICFocus(R->Input_Context);
+#endif
+#ifdef CURSOR_BLINK
+ if (R->Options & Opt_cursorBlink)
+ R->blink_ev.stop ();
+ R->hidden_cursor = 0;
#endif
}
break;
/*--------------------------------*-C-*---------------------------------*
* File: init.c
*----------------------------------------------------------------------*
- * $Id: init.C,v 1.4 2003-11-25 15:25:17 pcg Exp $
+ * $Id: init.C,v 1.5 2003-11-25 15:44:38 pcg Exp $
*
* All portions of code are copyright by their respective author/s.
* Copyright (c) 1992 John Bovey, University of Kent at Canterbury <jdb@ukc.ac.uk>
cmd_pid = -1;
cmd_fd = tty_fd = Xfd = -1;
PrivateModes = SavedModes = PrivMode_Default;
- TermWin.focus = 1;
+ TermWin.focus = 0;
TermWin.ncol = 80;
TermWin.nrow = 24;
TermWin.int_bwidth = INTERNALBORDERWIDTH;
/*--------------------------------*-C-*---------------------------------*
* File: main.c
*----------------------------------------------------------------------*
- * $Id: main.C,v 1.4 2003-11-25 15:25:17 pcg Exp $
+ * $Id: main.C,v 1.5 2003-11-25 15:44:38 pcg Exp $
*
* All portions of code are copyright by their respective author/s.
* Copyright (c) 1992 John Bovey, University of Kent at Canterbury <jdb@ukc.ac.uk>
}
rxvt_term::rxvt_term ()
-: pty_ev(this, &rxvt_term::pty_cb),
- x_ev (this, &rxvt_term::x_cb)
+: pty_ev (this, &rxvt_term::pty_cb),
+#ifdef CURSOR_BLINK
+ blink_ev (this, &rxvt_term::blink_cb),
+#endif
+ x_ev (this, &rxvt_term::x_cb)
{
cmdbuf_ptr = cmdbuf_endp = cmdbuf_base;
}
/*
- * $Id: rxvt.h,v 1.4 2003-11-25 15:25:17 pcg Exp $
+ * $Id: rxvt.h,v 1.5 2003-11-25 15:44:39 pcg Exp $
*/
#ifndef _RXVT_H_ /* include once only */
# include "menubar.h"
#endif
+#define BLINK_INTERVAL 0.5
+
struct mbstate {
unsigned char orig;
uint32_t reg;
void pty_cb (io_watcher &w, short revents); io_watcher pty_ev;
void x_cb (io_watcher &w, short revents); io_watcher x_ev;
+#ifdef CURSOR_BLINK
+ void blink_cb (time_watcher &w); time_watcher blink_ev;
+#endif
+
void flush ();
rxvt_term ();
#endif
#endif /* _RXVT_H_ */
+