repo: rxvt-unicode-sixel action: commit revision: path_from: revision_from: a06ec086ae8ee73298087fb150d87c2a7fbbd933: path_to: revision_to:
commit a06ec086ae8ee73298087fb150d87c2a7fbbd933 Author: Marc LehmannDate: Sat Jan 21 14:25:05 2006 +0000 *** empty log message *** diff --git a/Changes b/Changes
--- a/Changes
+++ b/Changes
@@ -26,6 +26,9 @@ WISH: support tex fonts
with shift - mouse button 2
- fixed the automove-background extension to ignore coordinates
in non-synthetic events.
+ - the non-terminfo visual bell is now done asynchronously, so
+ continous ASCI BELs in one terminal do no longer monopolise the
+ while urxvt[d] process.
- removed support for obsolete offix dnd protocol.
7.1 Thu Jan 19 20:25:34 CET 2006
diff --git a/src/command.C b/src/command.C
--- a/src/command.C
+++ b/src/command.C
@@ -2631,11 +2631,6 @@ rxvt_term::check_our_parents ()
}
else
{
-#if WAIT_FOR_WM
- /* wait (an arbitrary period) for the WM to do its thing
- * needed for fvwm2.2.2 (and before?) */
- sleep (1);
-#endif
for (n = 0; n < (unsigned int)i; n++)
{
XSetWindowBackgroundPixmap (disp, parent[n], ParentRelative);
diff --git a/src/feature.h b/src/feature.h
--- a/src/feature.h +++ b/src/feature.h @@ -365,20 +365,13 @@ /* * Provide termcap/terminfo bw support (wrap backwards on cub1) */ -#define TERMCAP_HAS_BW +#define TERMCAP_HAS_BW 1 /* - * Some (older, e.g. fvwm 2.2.2) window managers need some time when - * updating window positions. If transparency isn't working correctly - * then you might try out this one. - */ -/* #define WAIT_FOR_WM */ - -/* - * The duration of the visual bell flash in µs. The default of 20ms + * The duration of the visual bell flash in s. The default of 20ms * corresponds to the delay given in the terminfo flash code. */ -#define VISUAL_BELL_DURATION 20000 +#define VISUAL_BELL_DURATION .020 #endif diff --git a/src/iom.C b/src/iom.C
--- a/src/iom.C
+++ b/src/iom.C
@@ -118,7 +118,7 @@ static struct sw0 : sig_watcher
pw.erase_unordered (i);
else if (w->pid == pid)
{
- w->stop ();
+ io_manager::unreg (*w);
w->call (*w, status);
}
}
diff --git a/src/main.C b/src/main.C
--- a/src/main.C
+++ b/src/main.C
@@ -171,6 +171,9 @@ rxvt_term::rxvt_term ()
#endif
#ifdef USE_XIM
im_ev (this, &rxvt_term::im_cb),
+#endif
+#ifndef NO_BELL
+ bell_ev (this, &rxvt_term::bell_cb),
#endif
termwin_ev (this, &rxvt_term::x_cb),
vt_ev (this, &rxvt_term::x_cb),
diff --git a/src/rxvt.h b/src/rxvt.h
--- a/src/rxvt.h
+++ b/src/rxvt.h
@@ -1022,7 +1022,10 @@ struct rxvt_term : zero_initialized, rxvt_vars {
selection_wait,
selection_type;
/* ---------- */
- short rvideo;
+ bool rvideo_state, rvideo_mode;
+#ifndef NO_BELL
+ bool rvideo_bell;
+#endif
int num_scr; /* screen: number lines scrolled */
int prev_ncol, /* screen: previous number of columns */
prev_nrow; /* screen: previous number of rows */
@@ -1197,9 +1200,7 @@ struct rxvt_term : zero_initialized, rxvt_vars {
void check_cb (check_watcher &w); check_watcher check_ev;
void destroy_cb (time_watcher &w); time_watcher destroy_ev;
void flush_cb (time_watcher &w); time_watcher flush_ev;
-
void pty_cb (io_watcher &w, short revents); io_watcher pty_ev;
-
void incr_cb (time_watcher &w) NOTHROW; time_watcher incr_ev;
#ifdef CURSOR_BLINK
@@ -1208,6 +1209,9 @@ struct rxvt_term : zero_initialized, rxvt_vars {
#ifdef TEXT_BLINK
void text_blink_cb (time_watcher &w); time_watcher text_blink_ev;
#endif
+#ifndef NO_BELL
+ void bell_cb (time_watcher &w); time_watcher bell_ev;
+#endif
#ifndef NO_SCROLLBAR_BUTTON_CONTINUAL_SCROLLING
void cont_scroll_cb (time_watcher &w); time_watcher cont_scroll_ev;
@@ -1449,7 +1453,7 @@ struct rxvt_term : zero_initialized, rxvt_vars {
void scr_relative_origin (int mode) NOTHROW;
void scr_insert_mode (int mode) NOTHROW;
void scr_set_tab (int mode) NOTHROW;
- void scr_rvideo_mode (int mode) NOTHROW;
+ void scr_rvideo_mode (bool on) NOTHROW;
void scr_report_position () NOTHROW;
void set_font_style () NOTHROW;
void scr_charset_choose (int set) NOTHROW;
diff --git a/src/screen.C b/src/screen.C
--- a/src/screen.C
+++ b/src/screen.C
@@ -236,7 +236,7 @@ rxvt_term::scr_reset ()
selection.op = SELECTION_CLEAR;
selection.screen = PRIMARY;
selection.clicks = 0;
- rvideo = 0;
+ rvideo_state = rvideo_mode = false;
}
else
{
@@ -1623,27 +1623,32 @@ rxvt_term::scr_set_tab (int mode) NOTHROW
* XTERM_SEQ: Normal video : ESC [ ? 5 l
*/
void
-rxvt_term::scr_rvideo_mode (int mode) NOTHROW
+rxvt_term::scr_rvideo_mode (bool on) NOTHROW
{
- XGCValues gcvalue;
+ rvideo_mode = on;
+
+#ifndef NO_BELL
+ on ^= rvideo_bell;
+#endif
- if (rvideo != mode)
+ if (rvideo_state != on)
{
- rvideo = mode;
+ rvideo_state = on;
+
::swap (pix_colors[Color_fg], pix_colors[Color_bg]);
#if XPM_BACKGROUND
if (bgPixmap.pixmap == None)
#endif
#if TRANSPARENT
- if (! OPTION (Opt_transparent) || am_transparent == 0)
+ if (!OPTION (Opt_transparent) || am_transparent == 0)
#endif
- XSetWindowBackground (display->display, vt,
- pix_colors[Color_bg]);
+ XSetWindowBackground (display->display, vt, pix_colors[Color_bg]);
+ XGCValues gcvalue;
gcvalue.foreground = pix_colors[Color_fg];
gcvalue.background = pix_colors[Color_bg];
- XChangeGC (display->display, gc, GCBackground | GCForeground,
- &gcvalue);
+ XChangeGC (display->display, gc, GCBackground | GCForeground, &gcvalue);
+
scr_clear ();
scr_touch (true);
}
@@ -1853,6 +1858,15 @@ rxvt_term::scr_changeview (int new_view_start) NOTHROW
return true;
}
+#ifndef NO_BELL
+void
+rxvt_term::bell_cb (time_watcher &w)
+{
+ rvideo_bell = false;
+ scr_rvideo_mode (rvideo_mode);
+}
+#endif
+
/* ------------------------------------------------------------------------- */
void
rxvt_term::scr_bell () NOTHROW
@@ -1868,10 +1882,11 @@ rxvt_term::scr_bell () NOTHROW
if (OPTION (Opt_visualBell))
{
- scr_rvideo_mode (!rvideo); /* refresh also done */
+ rvideo_bell = true;
+ scr_rvideo_mode (rvideo_mode);
display->flush ();
- rxvt_usleep (VISUAL_BELL_DURATION);
- scr_rvideo_mode (!rvideo); /* refresh also done */
+
+ bell_ev.start (NOW + VISUAL_BELL_DURATION);
}
else
XBell (display->display, 0);
-----END OF PAGE-----