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
}
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);
/*
* 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
pw.erase_unordered (i);
else if (w->pid == pid)
{
- w->stop ();
+ io_manager::unreg (*w);
w->call (*w, status);
}
}
#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),
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 */
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
#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;
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;
selection.op = SELECTION_CLEAR;
selection.screen = PRIMARY;
selection.clicks = 0;
- rvideo = 0;
+ rvideo_state = rvideo_mode = false;
}
else
{
* 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);
}
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
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);