Index: libwnck/pager.c
===================================================================
RCS file: /cvs/gnome/libwnck/libwnck/pager.c,v
retrieving revision 1.37
diff -p -u -r1.37 pager.c
--- libwnck/pager.c	18 Apr 2004 20:34:03 -0000	1.37
+++ libwnck/pager.c	23 Jun 2004 23:48:17 -0000
@@ -1171,8 +1171,13 @@ wnck_pager_button_release (GtkWidget    
 	    if (wnck_workspace_get_viewport_x (space) != viewport_x ||
 		wnck_workspace_get_viewport_y (space) != viewport_y)
 	      wnck_screen_move_viewport (pager->priv->screen, viewport_x, viewport_y);
-              
-	    if (pager->priv->drag_window)
+            /* Activate the window clicked on *only* if it is in the
+             * current workspace.  Otherwise, the default window
+             * should be activated (but that's a job for the WM, not
+             * for the pager, as it is focus mode dependent).
+             */
+	    if ((space == wnck_screen_get_active_workspace (pager->priv->screen))
+                && (pager->priv->drag_window))
 	      wnck_window_activate (pager->priv->drag_window);
 	  }
       
