Index: libwnck/tasklist.c
===================================================================
RCS file: /cvs/gnome/libwnck/libwnck/tasklist.c,v
retrieving revision 1.77
diff -u -w -p -r1.77 tasklist.c
--- libwnck/tasklist.c	31 May 2005 15:47:22 -0000	1.77
+++ libwnck/tasklist.c	16 Jun 2005 23:01:51 -0000
@@ -134,6 +134,14 @@ struct _WnckTaskClass
   GObjectClass parent_class;
 };
 
+typedef struct _skipped_window
+{
+
+  WnckWindow *window;
+  gulong tag;
+
+} skipped_window;
+
 struct _WnckTasklistPrivate
 {
   WnckScreen *screen;
@@ -147,6 +155,10 @@ struct _WnckTasklistPrivate
   GList *class_groups;
   GList *windows;
 
+  /* windows with _NET_WM_STATE_SKIP_TASKBAR set; connected to"state_changed"*/
+  /* not included in tasklist*/
+  GList *skipped_windows; 
+
   /* Not handled by update_lists */
   GList *startup_sequences;
   
@@ -208,7 +220,9 @@ static GdkPixbuf *wnck_task_get_icon (Wn
 static gint       wnck_task_compare  (gconstpointer  a,
 				      gconstpointer  b);
 static void       wnck_task_update_visible_state (WnckTask *task);
-
+static void wnck_task_state_changed (WnckWindow     *window,
+    WnckWindowState changed_mask,  WnckWindowState new_state,
+    gpointer        data);
 
 static void wnck_tasklist_init        (WnckTasklist      *tasklist);
 static void wnck_tasklist_class_init  (WnckTasklistClass *klass);
@@ -679,6 +693,8 @@ wnck_tasklist_init (WnckTasklist *taskli
 
   tasklist->priv->monitor_num = -1;
 
+  tasklist->priv->skipped_windows =NULL;
+
   atk_obj = gtk_widget_get_accessible (widget);
   atk_object_set_name (atk_obj, _("Window List"));
   atk_object_set_description (atk_obj, _("Tool to switch between visible windows"));
@@ -710,6 +726,31 @@ wnck_tasklist_class_init (WnckTasklistCl
 }
 
 static void
+wnck_tasklist_free_skipped_windows (WnckTasklist  *tasklist)
+{
+
+  GList *l;
+  
+  l =tasklist->priv->skipped_windows;
+  
+  while (l != NULL)
+  {
+  
+    skipped_window *skipped = (skipped_window*) l->data;
+
+    g_signal_handler_disconnect (skipped->window, skipped->tag);
+    g_object_unref (skipped->window);
+    g_free (skipped);
+    l = l->next;
+  
+  }
+  
+  g_list_free (tasklist->priv->skipped_windows);
+  tasklist->priv->skipped_windows =NULL;
+  
+}
+
+static void
 wnck_tasklist_finalize (GObject *object)
 {
   WnckTasklist *tasklist;
@@ -724,6 +765,9 @@ wnck_tasklist_finalize (GObject *object)
   if (tasklist->priv->free_icon_loader_data != NULL)
     (* tasklist->priv->free_icon_loader_data) (tasklist->priv->icon_loader_data);
   
+  if (tasklist->priv->skipped_windows)
+    wnck_tasklist_free_skipped_windows (tasklist);
+  
   wnck_tasklist_disconnect_screen (tasklist);
 
   /* Tasks should have gone away due to removing their
@@ -1641,6 +1685,12 @@ wnck_tasklist_free_tasks (WnckTasklist *
     }
   g_assert (tasklist->priv->class_groups == NULL);
   g_assert (g_hash_table_size (tasklist->priv->class_group_hash) == 0);
+
+  if (tasklist->priv->skipped_windows)
+    wnck_tasklist_free_skipped_windows (tasklist);
+
+  g_assert (tasklist->priv->skipped_windows == NULL);
+
 }
 
 
@@ -1753,8 +1803,27 @@ wnck_tasklist_update_lists (WnckTasklist
 	    }
 	  
 	  class_group_task->windows = g_list_prepend (class_group_task->windows, win_task);
+	} else 
+ {
+
+     if ((wnck_window_get_state (win) & WNCK_WINDOW_STATE_SKIP_TASKLIST) &&
+           wnck_window_get_window_type (win) == WNCK_WINDOW_NORMAL ) //XXX include UTILITY too ?
+     {
+
+       skipped_window *new=g_new0 (skipped_window, 1);
+
+       new->window=g_object_ref (win);
+       new->tag=g_signal_connect (G_OBJECT (win), "state_changed",
+         G_CALLBACK (wnck_task_state_changed), tasklist);
+     
+        tasklist->priv->skipped_windows = 
+          g_list_prepend (tasklist->priv->skipped_windows, (gpointer) new);
+      
+      }
+
 	}
       
+      
       l = l->next;
     }
