Index: configure.in
===================================================================
RCS file: /cvs/gnome/libwnck/configure.in,v
retrieving revision 1.155
diff -p -u -r1.155 configure.in
--- configure.in	18 Jul 2005 06:56:24 -0000	1.155
+++ configure.in	18 Jul 2005 19:49:37 -0000
@@ -8,7 +8,7 @@ AM_MAINTAINER_MODE
 dnl libtool versioning for libwnck
 
 dnl increment if the interface has additions, changes, removals.
-LIBWNCK_CURRENT=18
+LIBWNCK_CURRENT=19
 
 dnl increment any time the source changes; set to
 dnl  0 if you increment CURRENT
Index: libwnck/tasklist.c
===================================================================
RCS file: /cvs/gnome/libwnck/libwnck/tasklist.c,v
retrieving revision 1.81
diff -p -u -r1.81 tasklist.c
--- libwnck/tasklist.c	18 Jul 2005 16:49:42 -0000	1.81
+++ libwnck/tasklist.c	18 Jul 2005 19:49:37 -0000
@@ -1999,6 +1999,20 @@ wnck_tasklist_window_changed_geometry (W
 }
 
 static void
+wnck_tasklist_window_needs_tracking (WnckWindow   *window,
+                                     WnckTasklist *tasklist)
+{
+#ifdef HAVE_STARTUP_NOTIFICATION
+  wnck_tasklist_check_end_sequence (tasklist, window);
+#endif
+  
+  wnck_tasklist_connect_window (tasklist, window);
+
+  wnck_tasklist_update_lists (tasklist);
+  gtk_widget_queue_resize (GTK_WIDGET (tasklist));
+}
+
+static void
 wnck_tasklist_connect_window (WnckTasklist *tasklist,
 			      WnckWindow   *window)
 {
@@ -2008,6 +2022,9 @@ wnck_tasklist_connect_window (WnckTaskli
   g_signal_connect_object (window, "geometry_changed",
 			   G_CALLBACK (wnck_tasklist_window_changed_geometry),
 			   tasklist, 0);
+  g_signal_connect_object (window, "window_needs_tracking",
+			   G_CALLBACK (wnck_tasklist_window_needs_tracking),
+			   tasklist, 0);
 }
 
 static void
@@ -2015,14 +2032,7 @@ wnck_tasklist_window_added (WnckScreen  
 			    WnckWindow   *win,
 			    WnckTasklist *tasklist)
 {
-#ifdef HAVE_STARTUP_NOTIFICATION
-  wnck_tasklist_check_end_sequence (tasklist, win);
-#endif
-  
-  wnck_tasklist_connect_window (tasklist, win);
-
-  wnck_tasklist_update_lists (tasklist);
-  gtk_widget_queue_resize (GTK_WIDGET (tasklist));
+  wnck_tasklist_window_needs_tracking (win, tasklist);
 }
 
 static void
Index: libwnck/window.c
===================================================================
RCS file: /cvs/gnome/libwnck/libwnck/window.c,v
retrieving revision 1.58
diff -p -u -r1.58 window.c
--- libwnck/window.c	18 Jul 2005 16:49:42 -0000	1.58
+++ libwnck/window.c	18 Jul 2005 19:49:37 -0000
@@ -137,6 +137,7 @@ enum {
   ICON_CHANGED,
   ACTIONS_CHANGED,
   GEOMETRY_CHANGED,
+  WINDOW_NEEDS_TRACKING,
   LAST_SIGNAL
 };
 
@@ -154,6 +155,7 @@ static void emit_actions_changed   (Wnck
                                     WnckWindowActions changed_mask,
                                     WnckWindowActions new_actions);
 static void emit_geometry_changed  (WnckWindow      *window);
+static void emit_window_needs_tracking (WnckWindow      *window);
 
 static void update_name      (WnckWindow *window);
 static void update_state     (WnckWindow *window);
@@ -282,6 +284,15 @@ wnck_window_class_init (WnckWindowClass 
                   NULL, NULL,
                   g_cclosure_marshal_VOID__VOID,
                   G_TYPE_NONE, 0);  
+
+  signals[WINDOW_NEEDS_TRACKING] =
+    g_signal_new ("window_needs_tracking",
+                  G_OBJECT_CLASS_TYPE (object_class),
+                  G_SIGNAL_RUN_LAST,
+                  G_STRUCT_OFFSET (WnckWindowClass, window_needs_tracking),
+                  NULL, NULL,
+                  g_cclosure_marshal_VOID__VOID,
+                  G_TYPE_NONE, 0);  
 }
 
 static void
@@ -2217,7 +2228,14 @@ force_update_now (WnckWindow *window)
   new_state = COMPRESS_STATE (window);
 
   if (old_state != new_state)
-    emit_state_changed (window, old_state ^ new_state, new_state);
+    {
+      gboolean was_skipped =       old_state & WNCK_WINDOW_STATE_SKIP_TASKLIST;
+      gboolean should_be_skipped = new_state & WNCK_WINDOW_STATE_SKIP_TASKLIST;
+      if (was_skipped && !should_be_skipped)
+        emit_window_needs_tracking (window);
+      else
+        emit_state_changed (window, old_state ^ new_state, new_state);
+    }
 
   if (old_actions != window->priv->actions)
     emit_actions_changed (window, old_actions ^ window->priv->actions,
@@ -2307,5 +2325,13 @@ emit_geometry_changed (WnckWindow *windo
 {
   g_signal_emit (G_OBJECT (window),
                  signals[GEOMETRY_CHANGED],
+                 0);
+}
+
+static void
+emit_window_needs_tracking (WnckWindow *window)
+{
+  g_signal_emit (G_OBJECT (window),
+                 signals[WINDOW_NEEDS_TRACKING],
                  0);
 }
Index: libwnck/window.h
===================================================================
RCS file: /cvs/gnome/libwnck/libwnck/window.h,v
retrieving revision 1.34
diff -p -u -r1.34 window.h
--- libwnck/window.h	18 Jul 2005 16:49:42 -0000	1.34
+++ libwnck/window.h	18 Jul 2005 19:49:37 -0000
@@ -125,6 +125,9 @@ struct _WnckWindowClass
 
   /* Changed size/position */
   void (* geometry_changed)      (WnckWindow       *window);
+
+  /* Window needs to be tracked again (unset skip_taskbar) */
+  void (* window_needs_tracking) (WnckWindow       *window);
 };
 
 GType wnck_window_get_type (void) G_GNUC_CONST;
