diff -pru metacity/src/display.c metacity-2/src/display.c
--- metacity/src/display.c	2004-09-30 16:09:53.035697134 -0600
+++ metacity-2/src/display.c	2004-09-30 16:25:52.471035285 -0600
@@ -1909,6 +1909,16 @@ event_callback (XEvent   *event,
 
               meta_workspace_focus_default_window (screen->active_workspace, NULL, meta_display_thou_shalt_return_a_timestamp (display));
             }
+
+          if (event->type == FocusIn &&
+              event->xfocus.mode == NotifyNormal &&
+              event->xfocus.detail == NotifyInferior &&
+              !enter_notify_events_will_handle_this)
+            {
+              meta_topic (META_DEBUG_FOCUS, 
+                          "Focus got set to root window, probably due to gnome-session logout dialog usage (see bug 153220).  Setting the default focus window.\n");
+              meta_workspace_focus_default_window (screen->active_workspace, NULL, meta_display_thou_shalt_return_a_timestamp (display));
+            }
         }
       break;
     case KeymapNotify:
