--- bell.c.orig	2009-11-14 08:23:14.000000000 -0800
+++ bell.c	2009-11-14 09:06:16.000000000 -0800
@@ -34,7 +34,7 @@
  * in visual mode and calls through to bell_visual_notify(). That
  * function then checks what kind of visual flash you like, and calls either
  * bell_flash_fullscreen()-- which calls bell_flash_screen() to do
- * its work-- or bell_flash_frame(), which flashes the focussed window
+ * its work-- or bell_flash_frame(), which flashes the focused window
  * using bell_flash_window_frame(), unless there is no such window, in
  * which case it flashes the screen instead. bell_flash_window_frame()
  * flashes the frame and calls bell_unflash_frame() as a timeout to
@@ -197,7 +197,7 @@
 /**
  * Makes a frame flash and then return to normal shortly afterwards.
  * This is done by setting a flag so that the theme
- * code will temporarily draw the frame as focussed if it's unfocussed and
+ * code will temporarily draw the frame as focused if it's unfocused and
  * vice versa, and then queueing a redraw. Lastly, we create a timeout so
  * that the flag can be unset and the frame re-redrawn.
  *
@@ -216,7 +216,7 @@
 }
 
 /**
- * Flashes the frame of the focussed window. If there is no focussed window,
+ * Flashes the frame of the focused window. If there is no focused window,
  * flashes the screen.
  *
  * \param display  The display the bell event came in on
@@ -231,15 +231,16 @@
   
   g_assert (xkb_ev->xkb_type == XkbBellNotify);
   window = meta_display_lookup_x_window (display, xkb_bell_event->window);
-  if (!window && (display->focus_window) && (display->focus_window->frame))
+  if (!window)
     {
       window = display->focus_window;
     }
-  if (window)
+  if (window && window->frame)
     {
       bell_flash_window_frame (window);
     }
-  else /* revert to fullscreen flash if there's no focussed window */
+  else /* revert to fullscreen flash if there's no focused window or if it
+          has no frame */
     {
       bell_flash_fullscreen (display, xkb_ev);
     }
