Index: src/window.c
===================================================================
--- src/window.c	(revision 3280)
+++ src/window.c	(working copy)
@@ -5144,7 +5144,8 @@
            * with some things you might do inside the focused window, by
            * causing the client to get funky enter/leave events.
            */
-          if (meta_prefs_get_focus_mode () == META_FOCUS_MODE_CLICK)
+          if (meta_prefs_get_focus_mode () == META_FOCUS_MODE_CLICK ||
+              !meta_prefs_get_raise_on_click())
             meta_display_ungrab_focus_window_button (window->display, window);
         }
     }
@@ -5184,7 +5185,8 @@
           meta_window_update_layer (window);
 
           /* Re-grab for click to focus, if necessary */
-          if (meta_prefs_get_focus_mode () == META_FOCUS_MODE_CLICK)
+          if (meta_prefs_get_focus_mode () == META_FOCUS_MODE_CLICK ||
+              !meta_prefs_get_raise_on_click ())
             meta_display_grab_focus_window_button (window->display, window);
        }
     }
