diff --git a/src/display.c b/src/display.c
index 9a4a6bd..5bfdf18 100644
--- a/src/display.c
+++ b/src/display.c
@@ -4312,7 +4312,9 @@ meta_display_get_tab_list (MetaDisplay   *display,
         if (!window->minimized &&
             window->screen == screen &&
             IN_TAB_CHAIN (window, type))
-          tab_list = g_list_prepend (tab_list, window);
+          {
+            tab_list = g_list_prepend (tab_list, window);
+          }
         
         tmp = tmp->next;
       }
@@ -4329,12 +4331,36 @@ meta_display_get_tab_list (MetaDisplay   *display,
         if (window->minimized &&
             window->screen == screen &&
             IN_TAB_CHAIN (window, type))
-          tab_list = g_list_prepend (tab_list, window);
+          {
+            tab_list = g_list_prepend (tab_list, window);
+          }
         
         tmp = tmp->next;
       }
   }
 
+  // Question is should we put these first or not?
+  {
+	 GSList *tmp;
+	 MetaWindow *l_window;
+
+	 tmp = meta_display_list_windows(display);
+
+    // Go through all windows
+    while (tmp != NULL)
+      {
+         l_window=tmp->data;
+                  
+         // Check to see if it demands attention
+         if (l_window->wm_state_demands_attention) 
+           {
+             // if it does, add it to the popup
+             tab_list = g_list_prepend(tab_list, l_window);
+           }
+         tmp = tmp->next;
+       } // End while tmp3!=NULL
+  }
+
   tab_list = g_list_reverse (tab_list);
   
   return tab_list;
diff --git a/src/window.c b/src/window.c
index bcedd84..ad6464c 100644
--- a/src/window.c
+++ b/src/window.c
@@ -2167,7 +2167,9 @@ meta_window_show (MetaWindow *window)
        * which we are going to call ourselves here a few lines down.
        */
       if (overlap)
-        window->wm_state_demands_attention = TRUE;
+        {
+          window->wm_state_demands_attention = TRUE;
+        }
     } 
 
   /* Shaded means the frame is mapped but the window is not */
@@ -8060,29 +8062,39 @@ meta_window_set_demands_attention (MetaWindow *window)
    * overlapping it?
    */
 
-  meta_window_get_outer_rect (window, &candidate_rect);
+  // Consider a window obscured if it's on a workspace that isn't the current
+  // one
+  MetaWorkspace *workspace = window->screen->active_workspace;
+  if (workspace!=window->workspace)
+    {
+      obscured = TRUE;
+    }
 
-  /* The stack is sorted with the top windows first. */
-  
-  while (stack != NULL && stack->data != window)
+  if (!obscured)
     {
-      other_window = stack->data;
-      stack = stack->next;
-     
-      if (other_window->on_all_workspaces ||
-          window->on_all_workspaces ||
-          other_window->workspace == window->workspace)
-        {
-          meta_window_get_outer_rect (other_window, &other_rect);
+      meta_window_get_outer_rect (window, &candidate_rect);
 
-          if (meta_rectangle_overlap (&candidate_rect, &other_rect))
+      /* The stack is sorted with the top windows first. */
+      
+      while (stack != NULL && stack->data != window)
+        {
+          other_window = stack->data;
+          stack = stack->next;
+         
+          if (other_window->on_all_workspaces ||
+              window->on_all_workspaces ||
+              other_window->workspace == window->workspace)
             {
-              obscured = TRUE;
-              break;
+              meta_window_get_outer_rect (other_window, &other_rect);
+
+              if (meta_rectangle_overlap (&candidate_rect, &other_rect))
+                {
+                  obscured = TRUE;
+                  break;
+                }
             }
         }
     }
-
   /* If the window's in full view, there's no point setting the flag. */
   
   if (!obscured)
