*** empty log message ***
authorroot <root>
Sat, 21 Jan 2006 14:25:05 +0000 (14:25 +0000)
committerroot <root>
Sat, 21 Jan 2006 14:25:05 +0000 (14:25 +0000)
Changes
src/command.C
src/feature.h
src/iom.C
src/main.C
src/rxvt.h
src/screen.C

diff --git a/Changes b/Changes
index 03306d357f406e331a580a7257bb508af7e4e76e..84d3d53deaf05ee5aaf54f689c254fe069a9f9bf 100644 (file)
--- 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
index fbbaecc15db8421f766d8714e84b06930b490bcb..e5d955c83dd064a75608bfcf39d332dc02d73f96 100644 (file)
@@ -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);
index 45581948e7845713693a60b3a572420f0d01d518..e967bd02a6e3a36b0c35ea28015dc03213e8be07 100644 (file)
 /*
  * 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
 
index fd35d2e7b2d622a92196dfd08e912be38ff54552..faa0611a362a1d3c86a133382a59c35fbc2030d4 100644 (file)
--- 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);
             }
          }
index c3dceee9e9367474fce6ffe2c48f506fcd1d7a47..8290a3284f80b33895a017d88f62e6ddeef37624 100644 (file)
@@ -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),
index 22c5bbca868074aa174cfb913f55b56cdf52bc05..13196d866c171c27d4aafd6946bf1f792b7d262c 100644 (file)
@@ -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;
index 6cd1c5fa51ba8d2b2343a2bdd5a5b11d342c9ec2..5767a16843a54daad81a0e872f1ecf53756e6493 100644 (file)
@@ -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);