Index: src/display.c
===================================================================
RCS file: /cvs/gnome/metacity/src/display.c,v
retrieving revision 1.243
diff -p -u -r1.243 display.c
--- src/display.c	28 Dec 2004 22:31:10 -0000	1.243
+++ src/display.c	4 Jan 2005 23:33:45 -0000
@@ -1598,32 +1598,32 @@ event_callback (XEvent   *event,
           if (unmodified ||
               event->xbutton.button == 1)
             {
+              /* don't focus if frame received, will be lowered in
+               * frames.c or special-cased if the click was on a
+               * minimize/close button.
+               */
               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.
-                   */
-
                   /* 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
                    */
                   if (TRUE /* meta_prefs_get_focus_mode () == META_FOCUS_MODE_CLICK */) 
+                    meta_window_raise (window);
+                  else
+                    meta_topic (META_DEBUG_FOCUS,
+                                "Not raising window on click due to mouse/sloppy focus mode\n");
+
+                  /* Don't focus panels--they must explicitly request focus.
+                   * See bug 160470
+                   */
+		  if (window->type != META_WINDOW_DOCK)
                     {
-                      meta_window_raise (window);
-                      
                       meta_topic (META_DEBUG_FOCUS,
                                   "Focusing %s due to unmodified button %d press (display.c)\n",
                                   window->desc, event->xbutton.button);
                       meta_window_focus (window, event->xbutton.time);
                     }
-                  else
-                    {
-                      meta_topic (META_DEBUG_FOCUS,
-                                  "Not raising window on click due to mouse/sloppy focus mode\n");
-                      meta_window_focus (window, event->xbutton.time);
-                    }
                 }
               
               /* you can move on alt-click but not on
@@ -2111,6 +2111,12 @@ event_callback (XEvent   *event,
           if (!frame_was_receiver)
             meta_window_client_message (window, event);
         }
+      else if (event->xclient.message_type ==
+               display->atom_net_active_window)
+        {
+          meta_warning ("_NET_ACTIVE_WINDOW request for unknown window 0x%lx\n",
+                        event->xclient.window);
+        }          
       else
         {
           MetaScreen *screen;
Index: src/window.c
===================================================================
RCS file: /cvs/gnome/metacity/src/window.c,v
retrieving revision 1.359
diff -p -u -r1.359 window.c
--- src/window.c	28 Dec 2004 06:01:42 -0000	1.359
+++ src/window.c	4 Jan 2005 23:33:50 -0000
@@ -4118,7 +4118,7 @@ meta_window_client_message (MetaWindow *
   else if (event->xclient.message_type ==
            display->atom_net_active_window)
     {
-      meta_verbose ("_NET_ACTIVE_WINDOW request for window '%s', activating",
+      meta_warning ("Successful _NET_ACTIVE_WINDOW request for window '%s'\n",
                     window->desc);
 
       if (event->xclient.data.l[0] != 0)
