Index: libwnck/ChangeLog
===================================================================
RCS file: /export/cvs/gnome-2.0/libwnck/ChangeLog,v
retrieving revision 1.26
diff -p -u -5 -r1.26 ChangeLog
--- libwnck/ChangeLog	2002/07/06 23:10:12	1.26
+++ libwnck/ChangeLog	2002/07/31 15:12:21
@@ -1,5 +1,13 @@
+2002-07-31  Arvind Samptur <arvind.samptur@wipro.com>
+	* libwnck/tasklist.c (wnck_tasklist_change_active_task) 
+	(wnck_tasklist_activate_task_window) :
+        Minimizing and restoring windows on single click.
+	Save the previous active task, helps in getting around
+	the problem of wnck_window_is_active() being called 
+	after update_active_window() is called.
+	
 2002-07-06  Havoc Pennington  <hp@pobox.com>
 
 	* libwnck/window.c (update_state): make dialogs skip the task
 	list, so only normal windows are in there. bug #83483
 
Index: libwnck/libwnck/tasklist.c
===================================================================
RCS file: /export/cvs/gnome-2.0/libwnck/libwnck/tasklist.c,v
retrieving revision 1.10
diff -p -u -5 -r1.10 tasklist.c
--- libwnck/libwnck/tasklist.c	2002/06/13 22:37:03	1.10
+++ libwnck/libwnck/tasklist.c	2002/07/31 15:12:22
@@ -97,10 +97,12 @@ struct _WnckTasklistPrivate
 {
   WnckScreen *screen;
 
   WnckTask *active_task; /* NULL if active window not in tasklist */
   WnckTask *active_app; /* NULL if active window not in tasklist */
+
+  WnckTask *was_active_task;
   
   gboolean include_all_workspaces;
   
   /* Calculated by update_lists */
   GList *windows;
@@ -1191,10 +1193,12 @@ wnck_tasklist_change_active_task (WnckTa
       active_task == tasklist->priv->active_task)
     return;
 
   if (tasklist->priv->active_task)
     {
+
+      tasklist->priv->was_active_task = tasklist->priv->active_task;
       tasklist->priv->active_task->really_toggling = TRUE;
       gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (tasklist->priv->active_task->button),
 				    FALSE);
       tasklist->priv->active_task->really_toggling = FALSE;
     }
@@ -1369,11 +1373,11 @@ wnck_tasklist_activate_task_window     (
 	  
       wnck_window_activate (task->window);
     }
   else
     {
-      if (wnck_window_is_active (task->window))
+      if (tasklist->priv->was_active_task && tasklist->priv->was_active_task == task)
 	{
 	  wnck_window_minimize (task->window);
 	  return;
 	}
       else
