-- Leo's gemini proxy
-- Connecting to git.thebackupbox.net:1965...
-- Connected
-- Sending request
-- Meta line: 20 text/gemini
repo: rxvt-unicode-sixel action: commit revision: path_from: revision_from: 17c778931c0d788b3720d27462525ce2d52bd527: path_to: revision_to:
commit 17c778931c0d788b3720d27462525ce2d52bd527 Author: Marc Lehmann <schmorp@schmorp.de> Date: Thu Jan 29 23:26:01 2004 +0000 *** empty log message *** diff --git a/Changes b/Changes
--- a/Changes +++ b/Changes @@ -1,5 +1,9 @@ 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 diff --git a/autoconf/configure.in b/autoconf/configure.in
--- a/autoconf/configure.in +++ b/autoconf/configure.in @@ -1,6 +1,6 @@ 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# @@ -354,7 +354,7 @@ AC_ARG_ENABLE(cursor-blink, 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]) @@ -1196,7 +1196,7 @@ 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 diff --git a/src/command.C b/src/command.C
--- a/src/command.C +++ b/src/command.C @@ -1,7 +1,7 @@ /*--------------------------------*-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> @@ -718,8 +718,7 @@ rxvt_term::process_x_events () XNextEvent (Xdisplay, &xev); #if defined(CURSOR_BLINK) - if ((Options & Opt_cursorBlink) - && xev.type == KeyPress) + if ((Options & Opt_cursorBlink) && xev.type == KeyPress) { if (hidden_cursor) { @@ -727,13 +726,12 @@ rxvt_term::process_x_events () 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 @@ -756,7 +754,7 @@ rxvt_term::process_x_events () #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; @@ -765,6 +763,19 @@ rxvt_term::blink_cb (time_watcher &w) } #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) { @@ -1294,7 +1305,7 @@ rxvt_process_x_event(pR_ XEvent *ev) #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; @@ -1309,7 +1320,7 @@ rxvt_process_x_event(pR_ XEvent *ev) #endif #ifdef CURSOR_BLINK if (R->Options & Opt_cursorBlink) - R->blink_ev.stop (); + R->cursor_blink_ev.stop (); R->hidden_cursor = 0; #endif } @@ -1360,10 +1371,16 @@ rxvt_process_x_event(pR_ XEvent *ev) 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: diff --git a/src/iom.C b/src/iom.C
--- a/src/iom.C +++ b/src/iom.C @@ -67,6 +67,9 @@ void io_manager::reg (watcher *w, io_manager_vec<watcher> &queue) if (!w->active) { +#if IOM_CHECK + queue.activity = true; +#endif queue.push_back (w); w->active = queue.size (); } @@ -178,11 +181,20 @@ void io_manager::loop () } #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 diff --git a/src/iom.h b/src/iom.h
--- a/src/iom.h +++ b/src/iom.h @@ -62,6 +62,10 @@ template<class watcher> 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]; diff --git a/src/main.C b/src/main.C
--- a/src/main.C +++ b/src/main.C @@ -1,7 +1,7 @@ /*--------------------------------*-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> @@ -76,7 +76,10 @@ rxvt_term::operator delete (void *p, size_t s) 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), @@ -126,7 +129,10 @@ rxvt_term::destroy () 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 (); diff --git a/src/rxvt.h b/src/rxvt.h
--- a/src/rxvt.h +++ b/src/rxvt.h @@ -806,6 +806,7 @@ enum { #endif #define BLINK_INTERVAL 0.5 +#define TEXT_BLINK_INTERVAL 0.5 struct mbstate { mbstate_t mbs; @@ -1070,7 +1071,10 @@ struct rxvt_term : rxvt_vars { 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 @@ -1138,6 +1142,7 @@ struct rxvt_term : rxvt_vars { 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); diff --git a/src/screen.C b/src/screen.C
--- a/src/screen.C +++ b/src/screen.C @@ -1650,6 +1650,30 @@ rxvt_scr_charset_set(pR_ int set, unsigned int ch) * MAJOR SCREEN MANIPULATION * * ------------------------------------------------------------------------- */ +/* + * 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 */ @@ -2135,7 +2159,18 @@ rxvt_term::scr_refresh (unsigned char refresh_type) 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)) @@ -2160,8 +2195,11 @@ rxvt_term::scr_refresh (unsigned char refresh_type) #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) {
-----END OF PAGE-----
-- Response ended
-- Page fetched on Sun Jun 2 11:54:14 2024