Index: libwnck/libwnck/tasklist.c
===================================================================
RCS file: /export/cvs/gnome-2.0/libwnck/libwnck/tasklist.c,v
retrieving revision 1.11
diff -p -u -5 -r1.11 tasklist.c
--- libwnck/libwnck/tasklist.c	2002/08/02 23:34:27	1.11
+++ libwnck/libwnck/tasklist.c	2002/08/08 09:27:10
@@ -84,10 +84,12 @@ struct _WnckTask
 
   /* task menu */
   GtkWidget *menu;
   /* ops menu */
   GtkWidget *action_menu;
+  
+  gboolean was_active;
 };
 
 struct _WnckTaskClass
 {
   GObjectClass parent_class;
@@ -1440,12 +1442,13 @@ wnck_tasklist_activate_task_window     (
 	  
       wnck_window_activate (task->window);
     }
   else
     {
-      if (wnck_window_is_active (task->window))
+      if (task->was_active)
 	{
+	  task->was_active = FALSE;
 	  wnck_window_minimize (task->window);
 	  return;
 	}
       else
 	{
@@ -1822,11 +1825,17 @@ wnck_task_button_press_event (GtkWidget	
 
       /* FIXME we should really arrange to destroy the menu on popdown */
       
       return TRUE;
     }
-  
+  else if (event->button == 1)
+    {
+        if (wnck_window_is_active (task->window))
+           task->was_active = TRUE;
+        else
+           task->was_active = FALSE;
+    }  
   return FALSE;
 }
 
 
 static void
