From rms@gnu.ai.mit.edu  Fri Sep 27 02:25:54 1996
X-VM-v5-Data: ([nil nil nil nil nil nil nil nil nil]
	[nil "Fri" "27" "September" "1996" "03:47:53" "-0400" "Richard Stallman" "rms@gnu.ai.mit.edu" nil "103" "Revised visible bell patch" "^From:" nil nil "9" nil nil nil nil]
	nil)
Received: from ethanol.gnu.ai.mit.edu (ethanol.gnu.ai.mit.edu [128.52.46.64]) by june.cs.washington.edu (8.7.5/7.2ju) with SMTP id CAA07699 for <voelker@cs.washington.edu>; Fri, 27 Sep 1996 02:25:53 -0700
Received: by ethanol.gnu.ai.mit.edu (8.6.12/8.6.12GNU) id DAA02602; Fri, 27 Sep 1996 03:47:53 -0400
Message-Id: <199609270747.DAA02602@ethanol.gnu.ai.mit.edu>
Sent-via-bcc-to: Emacs pretesters
From: Richard Stallman <rms@gnu.ai.mit.edu>
To: rms@gnu.ai.mit.edu
Subject: Revised visible bell patch
Date: Fri, 27 Sep 1996 03:47:53 -0400

Here is a revised version of the visible-bell patch.
It should look a little nicer.

*** xterm.c	1996/09/25 08:00:39	1.349
--- xterm.c	1996/09/27 07:44:39
***************
*** 1117,1127 ****
      }
  
      {
!       int width  = PIXEL_WIDTH  (f);
!       int height = PIXEL_HEIGHT (f);
  
-       XFillRectangle (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f), gc,
- 		      width/4, height/4, width/2, height/2);
        XFlush (FRAME_X_DISPLAY (f));
  
        {
--- 1117,1165 ----
      }
  
      {
!       /* Get the height not including a menu bar widget.  */
!       int height = CHAR_TO_PIXEL_HEIGHT (f, FRAME_HEIGHT (f));
!       /* Height of each line to flash.  */
!       int flash_height = FRAME_LINE_HEIGHT (f);
!       /* These will be the left and right margins of the rectangles.  */
!       int flash_left = FRAME_INTERNAL_BORDER_WIDTH (f);
!       int flash_right = PIXEL_WIDTH (f) - FRAME_INTERNAL_BORDER_WIDTH (f);
! 
!       int width;
! 
!       /* Don't flash the area between a scroll bar and the frame
! 	 edge it is next to.  */
!       switch (FRAME_VERTICAL_SCROLL_BAR_TYPE (f))
! 	{
! 	case vertical_scroll_bar_left:
! 	  flash_left += VERTICAL_SCROLL_BAR_WIDTH_TRIM;
! 	  break;
! 
! 	case vertical_scroll_bar_right:
! 	  flash_right -= VERTICAL_SCROLL_BAR_WIDTH_TRIM;
! 	  break;
! 	}
! 
!       width = flash_right - flash_left;
! 
!       /* If window is tall, flash top and bottom line.  */
!       if (height > 3 * FRAME_LINE_HEIGHT (f))
! 	{
! 	  XFillRectangle (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f), gc,
! 			  flash_left, FRAME_INTERNAL_BORDER_WIDTH (f),
! 			  width, flash_height);
! 	  XFillRectangle (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f), gc,
! 			  flash_left,
! 			  (height - flash_height
! 			   - FRAME_INTERNAL_BORDER_WIDTH (f)),
! 			  width, flash_height);
! 	}
!       else
! 	/* If it is short, flash it all.  */ 
! 	XFillRectangle (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f), gc,
! 			flash_left, FRAME_INTERNAL_BORDER_WIDTH (f),
! 			width, height - 2 * FRAME_INTERNAL_BORDER_WIDTH (f));
  
        XFlush (FRAME_X_DISPLAY (f));
  
        {
***************
*** 1151,1158 ****
  	  }
        }
  
!       XFillRectangle (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f), gc,
! 		      width/4, height/4, width/2, height/2);
        XFreeGC (FRAME_X_DISPLAY (f), gc);
        XFlush (FRAME_X_DISPLAY (f));
      }
--- 1189,1212 ----
  	  }
        }
  
!       /* If window is tall, flash top and bottom line.  */
!       if (height > 3 * FRAME_LINE_HEIGHT (f))
! 	{
! 	  XFillRectangle (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f), gc,
! 			  flash_left, FRAME_INTERNAL_BORDER_WIDTH (f),
! 			  width, flash_height);
! 	  XFillRectangle (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f), gc,
! 			  flash_left,
! 			  (height - flash_height
! 			   - FRAME_INTERNAL_BORDER_WIDTH (f)),
! 			  width, flash_height);
! 	}
!       else
! 	/* If it is short, flash it all.  */ 
! 	XFillRectangle (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f), gc,
! 			flash_left, FRAME_INTERNAL_BORDER_WIDTH (f),
! 			width, height - 2 * FRAME_INTERNAL_BORDER_WIDTH (f));
! 
        XFreeGC (FRAME_X_DISPLAY (f), gc);
        XFlush (FRAME_X_DISPLAY (f));
      }

From owner-ntemacs-users@june  Thu Feb 20 21:08:44 1997
X-VM-v5-Data: ([nil nil nil nil nil nil nil nil nil]
	[nil "Thu" "20" "February" "1997" "21:29:43" "-0700" "Sarir Khamsi" "sponge@futureone.com" nil "16" "Visible bell not visible" "^From:" nil nil "2" nil nil nil nil]
	nil)
Received: from joker.cs.washington.edu (joker.cs.washington.edu [128.95.1.42]) by june.cs.washington.edu (8.8.5+CS/7.2ju) with SMTP id VAA28012 for <voelker@june.cs.washington.edu>; Thu, 20 Feb 1997 21:08:44 -0800
Received: from june.cs.washington.edu (june.cs.washington.edu [128.95.1.4]) by joker.cs.washington.edu (8.6.12/7.2ws+) with ESMTP id VAA31124 for <voelker@joker.cs.washington.edu>; Thu, 20 Feb 1997 21:08:37 -0800
Received: from future.futureone.com (future.futureone.com [206.103.182.2]) by june.cs.washington.edu (8.8.5+CS/7.2ju) with ESMTP id UAA26179 for <ntemacs-users@cs.washington.edu>; Thu, 20 Feb 1997 20:33:01 -0800
Received: from SKID (ppp-phx-63.futureone.com [207.2.43.63]) by future.futureone.com (8.8.2/8.8.0) with SMTP id VAA02936 for <ntemacs-users@cs.washington.edu>; Thu, 20 Feb 1997 21:29:43 -0700 (MST)
Message-Id: <199702210429.VAA02936@future.futureone.com>
From: Sarir Khamsi <sponge@futureone.com>
To: ntemacs-users@cs.washington.edu
Subject: Visible bell not visible
Date: Thu, 20 Feb 1997 21:29:43 -0700 (MST)

Yo,

For some reason, doing 

(setq visible-bell t)

in my .emacs does not seem to work under emacs 19.34 and NT
4.0. And...wihtout it, I don't get any sound from my sound board like
I used to in previous versions. Any ideas? Thanks.

Sarir

-- 
Sarir (Riri) Khamsi
sponge@futureone.com
http://www.futureone.com/~sponge

