- XFillRectangle (dpy, win, gc, w->pixel_left, w->pixel_top,
- w->pixel_width, w->pixel_height);
+ default_face_height_and_width (frame, &flash_height, 0);
+
+ /* If window is tall, flash top and bottom line. */
+ if (EQ (Vvisible_bell, Qtop_bottom) && w->pixel_height > 3 * flash_height)
+ {
+ XFillRectangle (dpy, win, gc, w->pixel_left, w->pixel_top,
+ w->pixel_width, flash_height);
+ XFillRectangle (dpy, win, gc, w->pixel_left,
+ w->pixel_top + w->pixel_height - flash_height,
+ w->pixel_width, flash_height);
+ }
+ else
+ /* If it is short, flash it all. */
+ XFillRectangle (dpy, win, gc, w->pixel_left, w->pixel_top,
+ w->pixel_width, w->pixel_height);
+