Index: src/display.c
===================================================================
RCS file: /cvs/gnome/metacity/src/display.c,v
retrieving revision 1.237
diff -p -u -r1.237 display.c
--- src/display.c	25 Oct 2004 16:17:19 -0000	1.237
+++ src/display.c	19 Dec 2004 22:51:42 -0000
@@ -1589,13 +1589,15 @@ event_callback (XEvent   *event,
           if (unmodified ||
               event->xbutton.button == 1)
             {
-              if (!frame_was_receiver)
+              /* don't focus if frame received, will be lowered in
+               * frames.c or special-cased if the click was on a
+               * minimize/close button.
+               *
+               * Also, don't focus panels--they must explicitly
+               * request focus
+               */
+              if (!frame_was_receiver && window->type != META_WINDOW_DOCK)
                 {
-                  /* don't focus if frame received, will be lowered in
-                   * frames.c or special-cased if the click was on a
-                   * minimize/close button.
-                   */
-
                   /* Raise on clicking the client area always or only
                    * in click to focus mode? The debate rages.
                    * Feel free to change TRUE to FALSE or vice versa
