[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    KDE/kdebase/workspace/libs/taskmanager
From:       Marco Martin <notmart () gmail ! com>
Date:       2009-06-06 13:17:25
Message-ID: 1244294245.888299.7069.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 978223 by mart:

ensure that geometrytasks contains all the visible ones (the ones that
counts for the geometry) and use it to decide whether or not group the
tasks, so now group when full actually works


 M  +9 -4      groupmanager.cpp  


--- trunk/KDE/kdebase/workspace/libs/taskmanager/groupmanager.cpp #978222:978223
@@ -136,6 +136,7 @@
     QHash<WId, TaskPtr> taskList = TaskManager::self()->tasks();
     QMutableHashIterator<WId, TaskPtr> it(taskList);
 
+
     while (it.hasNext()) {
         it.next();
 
@@ -265,9 +266,13 @@
 
         QObject::connect(item, SIGNAL(destroyed(AbstractGroupableItem*)),
                          q, SLOT(taskItemDestroyed(AbstractGroupableItem*)));
-        itemList.insert(task, item); 
+        itemList.insert(task, item);
     }
 
+    if (!geometryTasks.contains(task)) {
+        geometryTasks.insert(task);
+    }
+
     //Find a fitting group for the task with GroupingStrategies
     if (abstractGroupingStrategy && !task->demandsAttention()) { //do not group attention tasks
         abstractGroupingStrategy->handleItem(item);
@@ -443,8 +448,6 @@
             removeTask(task);
         }
     }
-
-    geometryTasks.clear();
 }
 
 
@@ -517,7 +520,7 @@
         return;
     }
 
-    if (itemList.size() >= groupIsFullLimit) {
+    if (geometryTasks.size() >= groupIsFullLimit) {
         if (!abstractGroupingStrategy) {
             q->setGroupingStrategy(GroupManager::ProgramGrouping);
         }
@@ -536,6 +539,7 @@
 void GroupManager::setShowOnlyCurrentScreen(bool showOnlyCurrentScreen)
 {
     d->showOnlyCurrentScreen = showOnlyCurrentScreen;
+    d->reloadTasks();
 }
 
 bool GroupManager::showOnlyCurrentDesktop() const
@@ -546,6 +550,7 @@
 void GroupManager::setShowOnlyCurrentDesktop(bool showOnlyCurrentDesktop)
 {
     d->showOnlyCurrentDesktop = showOnlyCurrentDesktop;
+    d->reloadTasks();
 }
 
 bool GroupManager::showOnlyMinimized() const
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic