diff -u -r tasks/tasks.cpp tasks2/tasks.cpp
--- tasks/tasks.cpp	2008-08-07 18:33:44.000000000 -0400
+++ tasks2/tasks.cpp	2008-08-07 18:32:52.000000000 -0400
@@ -124,7 +124,6 @@
         m_layout->removeItem(item);
         scene()->removeItem(item);
     }
-
     updatePreferredSize();
     adjustStretch();
 }
@@ -138,31 +137,33 @@
 
     while (iter.hasNext()) {
         iter.next();
+	if(!iter.value()->isOnCurrentDesktop() && (m_showOnlyCurrentDesktop || m_showOnlyCurrentScreen)){
+	     connect(iter.value().data(),SIGNAL(changed()),  
+                           this, SLOT(addAttentionTask())); 
+	}
         addWindowTask(iter.value());
     }
 }
 
 void Tasks::addWindowTask(TaskPtr task)
-{
+{ 
     if (!task->showInTaskbar()) {
         return;
     }
-
-    if (m_showOnlyCurrentDesktop && !task->isOnCurrentDesktop()) {
+    
+    if (m_showOnlyCurrentDesktop && !task->isOnCurrentDesktop() && !task->demandsAttention()) { //&& !task->demandsAttention()
         return;
     }
 
-    if (m_showOnlyCurrentScreen && !isOnMyScreen(task)) {
+    if (m_showOnlyCurrentScreen && !isOnMyScreen(task) && !task->demandsAttention()) {  //&& !task->demandsAttention()
         return;
     }
-
+    
     NET::WindowType type = task->info().windowType(NET::NormalMask | NET::DialogMask |
                                                    NET::OverrideMask | NET::UtilityMask);
     if (type == NET::Utility) {
-        kDebug() << "skipping utility window" << task->name();
         return;
     }
-
     //TODO: shoul we check for transiency? if so the following code can detect it.
 /*
     QHash<TaskPtr,WindowTaskItem*>::iterator it = m_windowTaskItems.begin();
@@ -183,7 +184,7 @@
             break;
         }
     }
-
+     
     if (!item) {
         item = new WindowTaskItem(this, m_showTooltip);
         insertItemBeforeSpacer(item);
@@ -200,7 +201,7 @@
 
     connect(item, SIGNAL(activated(WindowTaskItem*)),
             this, SLOT(updateActive(WindowTaskItem*)));
-
+    
     updatePreferredSize();
 }
 
@@ -213,7 +214,6 @@
         item->deleteLater();
         m_activeTask = m_windowTaskItems.end();
     }
-    
     updatePreferredSize();
     adjustStretch();
 }
@@ -229,7 +229,6 @@
         item->deleteLater();
         ++it;
     }
-
     m_windowTaskItems.clear();
     m_activeTask = m_windowTaskItems.end();
     updatePreferredSize();
@@ -357,7 +356,6 @@
     if (!m_showOnlyCurrentDesktop) {
         return;
     }
-
     removeAllWindowTasks();
     registerWindowTasks();
 }
@@ -367,8 +365,7 @@
     if (!m_showOnlyCurrentDesktop) {
         return;
     }
-
-    if (!task->isOnCurrentDesktop()) {
+    if (!task->isOnCurrentDesktop() && !task->demandsAttention()) {
         removeWindowTask(task);
     } else if (!m_windowTaskItems.contains(task)) {
         addWindowTask(task);
@@ -389,7 +386,7 @@
 void Tasks::checkScreenChange()
 {
     foreach (const TaskPtr &task, m_geometryTasks) {
-        if (!isOnMyScreen(task)) {
+        if (!isOnMyScreen(task) && !task->demandsAttention()) {
             removeWindowTask(task);
         } else if (!m_windowTaskItems.contains(task)) {
             addWindowTask(task);
@@ -407,7 +404,6 @@
     else {
         m_layout->insertItem(m_layout->count()-1,item);
     }
-
     adjustStretch();
 }
 
@@ -577,6 +573,16 @@
     }
 }
 
+/** Adds a windowTaskItem that is demanding attention to the taskbar if it is not currently shown and is not on the current desktop.
+*This funtion applies when the m_showOnlyCurrentDesktop or m_showOnlyCurrentScreen switch set. */
+void Tasks::addAttentionTask(){
+  TaskPtr task;
+  task.attach(qobject_cast<TaskManager::Task*>(sender()));
+  if(task->demandsAttention() && !m_windowTaskItems.contains(task)){
+      addWindowTask(task);
+  }
+}
+
 K_EXPORT_PLASMA_APPLET(tasks, Tasks)
 
 #include "tasks.moc"
diff -u -r tasks/tasks.h tasks2/tasks.h
--- tasks/tasks.h	2008-08-07 18:33:44.000000000 -0400
+++ tasks2/tasks.h	2008-08-07 18:32:52.000000000 -0400
@@ -101,6 +101,7 @@
         void taskMovedDesktop(TaskPtr task);
         void windowChangedGeometry(TaskPtr task);
         void checkScreenChange();
+	void addAttentionTask();
 
 private:
         // creates task representations for existing windows
