1.6
- - nothing yet
+ - cleanups, minor bugfixes.
+ - blinking text.
+ - normal text color + bold gets white text instead of
+ normal text when colorBD is not set.
+ - support double-byte characters (by blocking).
1.5 Thu Jan 29 00:43:48 CET 2004
- share io manager between rxvt-unicode and vpe
dnl# -*- sh -*-
dnl#
-dnl# $Id: configure.in,v 1.6 2004-01-29 21:34:14 pcg Exp $
+dnl# $Id: configure.in,v 1.7 2004-01-29 23:26:01 pcg Exp $
dnl#
dnl# Process this file with autoconf to produce a configure script.
dnl#
fi])
AC_ARG_ENABLE(text-blink,
- [ --enable-text-blink enable blinking text],
+ [ --enable-text-blink enable blinking text],
[if test x$enableval = xyes -o x$enableval = xno; then
support_text_blink=$enableval
fi])
if test x$support_cursor_blink = xyes; then
AC_DEFINE(CURSOR_BLINK, 1, Define if you want blinking cursor support)
fi
-if test x$support_test_blink = xyes; then
+if test x$support_text_blink = xyes; then
AC_DEFINE(TEXT_BLINK, 1, Define if you want blinking text support)
fi
if test x$support_unicode3 = xyes; then
/*--------------------------------*-C-*---------------------------------*
* File: command.c
*----------------------------------------------------------------------*
- * $Id: command.C,v 1.30 2004-01-29 21:35:58 pcg Exp $
+ * $Id: command.C,v 1.31 2004-01-29 23:26:01 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>
XNextEvent (Xdisplay, &xev);
#if defined(CURSOR_BLINK)
- if ((Options & Opt_cursorBlink)
- && xev.type == KeyPress)
+ if ((Options & Opt_cursorBlink) && xev.type == KeyPress)
{
if (hidden_cursor)
{
want_refresh = 1;
}
- blink_ev.start (NOW + BLINK_INTERVAL);
+ cursor_blink_ev.start (NOW + BLINK_INTERVAL);
}
#endif
#if defined(POINTER_BLANK)
- if ((Options & Opt_pointerBlank)
- && (pointerBlankDelay > 0))
+ if ((Options & Opt_pointerBlank) && pointerBlankDelay > 0)
{
if (xev.type == MotionNotify
|| xev.type == ButtonPress
#ifdef CURSOR_BLINK
void
-rxvt_term::blink_cb (time_watcher &w)
+rxvt_term::cursor_blink_cb (time_watcher &w)
{
hidden_cursor = !hidden_cursor;
want_refresh = 1;
}
#endif
+#ifdef TEXT_BLINK
+void
+rxvt_term::text_blink_cb (time_watcher &w)
+{
+ if (scr_refresh_rend (RS_Blink, RS_Blink))
+ {
+ hidden_text = !hidden_text;
+ want_refresh = 1;
+ w.start (w.at + TEXT_BLINK_INTERVAL);
+ }
+}
+#endif
+
void
rxvt_term::x_cb (io_watcher &w, short revents)
{
#endif
#ifdef CURSOR_BLINK
if (R->Options & Opt_cursorBlink)
- R->blink_ev.start (NOW + BLINK_INTERVAL);
+ R->cursor_blink_ev.start (NOW + BLINK_INTERVAL);
#endif
}
break;
#endif
#ifdef CURSOR_BLINK
if (R->Options & Opt_cursorBlink)
- R->blink_ev.stop ();
+ R->cursor_blink_ev.stop ();
R->hidden_cursor = 0;
#endif
}
case UnmapNotify:
R->TermWin.mapped = 0;
+#ifdef TEXT_BLINK
+ R->text_blink_ev.stop ();
+#endif
break;
case MapNotify:
R->TermWin.mapped = 1;
+#ifdef TEXT_BLINK
+ R->text_blink_ev.start (NOW + TEXT_BLINK_INTERVAL);
+#endif
break;
case PropertyNotify:
if (!w->active)
{
+#if IOM_CHECK
+ queue.activity = true;
+#endif
queue.push_back (w);
w->active = queue.size ();
}
}
#if IOM_CHECK
+ tw.activity = false;
+
for (int i = cw.size (); i--; )
if (!cw[i])
cw.erase_unordered (i);
else
cw[i]->call (*cw[i]);
+
+ if (tw.activity)
+ {
+ tval.tv_sec = 0;
+ tval.tv_usec = 0;
+ to = &tval;
+ }
#endif
#if IOM_IO
struct io_manager_vec : protected vector<watcher *> {
friend class io_manager;
protected:
+#if IOM_CHECK
+ bool activity;
+#endif
+
void erase_unordered (unsigned int pos)
{
watcher *w = (*this)[size () - 1];
/*--------------------------------*-C-*---------------------------------*
* File: main.c
*----------------------------------------------------------------------*
- * $Id: main.C,v 1.20 2004-01-16 16:34:56 pcg Exp $
+ * $Id: main.C,v 1.21 2004-01-29 23:26:01 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 ()
: destroy_ev (this, &rxvt_term::destroy_cb),
#ifdef CURSOR_BLINK
- blink_ev (this, &rxvt_term::blink_cb),
+ cursor_blink_ev (this, &rxvt_term::cursor_blink_cb),
+#endif
+#ifdef TEXT_BLINK
+ text_blink_ev (this, &rxvt_term::text_blink_cb),
#endif
#ifdef POINTER_BLANK
pointer_ev (this, &rxvt_term::pointer_cb),
pty_ev.stop ();
x_ev.stop ();
#ifdef CURSOR_BLINK
- blink_ev.stop ();
+ cursor_blink_ev.stop ();
+#endif
+#ifdef TEXT_BLINK
+ text_blink_ev.stop ();
#endif
#ifdef POINTER_BLANK
pointer_ev.stop ();
#endif
#define BLINK_INTERVAL 0.5
+#define TEXT_BLINK_INTERVAL 0.5
struct mbstate {
mbstate_t mbs;
void incr_cb (time_watcher &w); time_watcher incr_ev;
#ifdef CURSOR_BLINK
- void blink_cb (time_watcher &w); time_watcher blink_ev;
+ void cursor_blink_cb (time_watcher &w); time_watcher cursor_blink_ev;
+#endif
+#ifdef TEXT_BLINK
+ void text_blink_cb (time_watcher &w); time_watcher text_blink_ev;
#endif
#ifdef POINTER_BLANK
void scr_release ();
void scr_clear ();
void scr_refresh (unsigned char refresh_type);
+ bool scr_refresh_rend (rend_t mask, rend_t value);
void scr_erase_screen (int mode);
void scr_touch (bool refresh);
void scr_expose (int x, int y, int width, int height, bool refresh);
* ------------------------------------------------------------------------- */
/*
+ * refresh matching text.
+ */
+bool
+rxvt_term::scr_refresh_rend (rend_t mask, rend_t value)
+{
+ bool found = false;
+
+ for (int i = 0; i < TermWin.nrow; i++)
+ {
+ int col = 0;
+ rend_t *drp = drawn_rend [i];
+
+ for (; col < TermWin.ncol; col++, drp++)
+ if ((*drp & mask) == value)
+ {
+ found = true;
+ *drp = ~value;
+ }
+ }
+
+ return found;
+}
+
+/*
* Refresh an area
*/
enum {
rend = GET_ATTR (rend);
rvid = !!(rend & RS_RVid);
-#ifdef OPTION_HC
+#ifdef TEXT_BLINK
+ if (rend & RS_Blink)
+ {
+ if (!text_blink_ev.active)
+ {
+ text_blink_ev.start (NOW + TEXT_BLINK_INTERVAL);
+ hidden_text = 0;
+ }
+ else if (hidden_text)
+ fore = back;
+ }
+#elif OPTION_HC
if (!rvid && (rend & RS_Blink))
{
if (Xdepth > 2 && ISSET_PIXCOLOR (this, Color_HC))
#ifndef NO_BOLD_UNDERLINE_REVERSE
else if (rend & RS_Bold)
{
- if (Xdepth > 2 && ISSET_PIXCOLOR (this, Color_BD))
- fore = Color_BD;
+ if (Xdepth > 2)
+ if (ISSET_PIXCOLOR (this, Color_BD))
+ fore = Color_BD;
+ else
+ fore = Color_White;
}
else if (rend & RS_Uline)
{