diff -ru -xwnck-enum-types.c -xwnck-enum-types.h -xwnck-marshal.c -xwnck-marshal.h -xinlinepixbufs.h libwnck-orig/libwnck/tasklist.c libwnck-2.15.90/libwnck/tasklist.c
--- libwnck-orig/libwnck/tasklist.c	2006-07-22 09:28:05.000000000 +1200
+++ libwnck-2.15.90/libwnck/tasklist.c	2006-08-12 23:09:10.000000000 +1200
@@ -2413,7 +2413,8 @@
     {
       if ((task->was_active || 
            wnck_window_transient_is_most_recently_activated (task->window)) &&
-          (!window_ws || active_ws == window_ws))
+          (!window_ws || active_ws == window_ws) &&
+           wnck_window_is_fully_visible (task->window))
 	{
 	  task->was_active = FALSE;
 	  wnck_window_minimize (task->window);
diff -ru -xwnck-enum-types.c -xwnck-enum-types.h -xwnck-marshal.c -xwnck-marshal.h -xinlinepixbufs.h libwnck-orig/libwnck/window.c libwnck-2.15.90/libwnck/window.c
--- libwnck-orig/libwnck/window.c	2006-07-21 05:45:44.000000000 +1200
+++ libwnck-2.15.90/libwnck/window.c	2006-08-13 00:04:09.000000000 +1200
@@ -1288,6 +1288,98 @@
   return window == wnck_screen_get_active_window (window->priv->screen);
 }
 
+static gboolean
+wnck_window_is_overlapping (WnckWindow *wa, WnckWindow *wb)
+{
+  int ax1 = wa->priv->x;
+  int ax2 = wa->priv->x + wa->priv->width;
+
+  int bx1 = wb->priv->x;
+  int bx2 = wb->priv->x + wb->priv->width;
+	
+  int ay1 = wa->priv->y;
+  int ay2 = wa->priv->y + wa->priv->height;
+
+  int by1 = wb->priv->y;
+  int by2 = wb->priv->y + wb->priv->height;
+
+  if (
+        (CLAMP(ax1, bx1, bx2) == ax1 || 
+        CLAMP(ax2, bx1, bx2) == ax2 ||
+        CLAMP(bx1, ax1, ax2) == bx1 ||
+        CLAMP(bx2, ax1, ax2) == bx2) &&
+        (CLAMP(ay1, by1, by2) == ay1 || 
+        CLAMP(ay2, by1, by2) == ay2 ||
+        CLAMP(by1, ay1, ay2) == by1 ||
+        CLAMP(by2, ay1, ay2) == by2)
+     )
+       return TRUE;
+
+  return FALSE;
+}
+
+/**
+ * wnck_window_is_fully_visible
+ * @window: a #WnckWindow
+ *
+ * Determines whether @window is fully visible.  This means
+ * there are no other windows that are on top of it and overlap
+ * the window.
+ *
+ * Return value: %TRUE if the window is fully visible.  %FALSE if
+ * the window is not found or has windows obscuring it.
+ **/
+gboolean
+wnck_window_is_fully_visible (WnckWindow *window)
+{
+  GList *windows;
+  GList *pos;
+  WnckWorkspace *current_workspace;
+  WnckWindow *window_pos;
+  gboolean valid_window; 
+  gboolean found_window = FALSE; /* flag for if we found the window in the stacking order */
+  
+  if (!WNCK_IS_WINDOW (window))
+    return FALSE;
+  
+  windows = wnck_screen_get_windows_stacked (window->priv->screen);
+  current_workspace = wnck_window_get_workspace(window);
+  pos = windows;
+  
+  /*
+  loop through windows stacking order and find if the window is fully visible.
+  If no other windows overlap and are on top of the window then we will return if
+  we actually found the window.
+  */  
+  while (pos != NULL)
+  {
+    window_pos = pos->data;
+    if (found_window)
+      {
+    	valid_window = 
+                   wnck_window_is_visible_on_workspace (window_pos, current_workspace) &&
+                   !wnck_window_is_skip_tasklist (window_pos);
+        
+         /*
+          check if the comparing window is on the current workspace, is NOT a special window
+          and is being overlapped.  This means there is a window that is higher on the stacking
+          order and overlaps the window we are looking at - the window is not fully visible.
+         */
+         
+         if (valid_window && window_pos != window &&
+    	   wnck_window_is_overlapping (window, window_pos))
+           return FALSE;
+              
+      }   
+    if (window_pos == window)
+      	found_window = TRUE;
+
+    pos = pos->next;
+  }
+
+  return found_window;
+}
+
 /**
  * wnck_window_is_most_recently_activated:
  * @window: a #WnckWindow
diff -ru -xwnck-enum-types.c -xwnck-enum-types.h -xwnck-marshal.c -xwnck-marshal.h -xinlinepixbufs.h libwnck-orig/libwnck/window.h libwnck-2.15.90/libwnck/window.h
--- libwnck-orig/libwnck/window.h	2006-07-21 05:45:44.000000000 +1200
+++ libwnck-2.15.90/libwnck/window.h	2006-08-12 23:26:51.000000000 +1200
@@ -230,6 +230,7 @@
 void     wnck_window_activate  (WnckWindow *window,
                                 guint32     timestamp);
 gboolean wnck_window_is_active (WnckWindow *window);
+gboolean wnck_window_is_fully_visible (WnckWindow *window);
 gboolean wnck_window_is_most_recently_activated (WnckWindow *window);
 void     wnck_window_activate_transient (WnckWindow *window,
                                          guint32     timestamp);
