don't consider matching activity list sizes as ALL if size is "1"

CCBUG: 301239
REVIEW: 105195
This commit is contained in:
Thomas Lübking 2012-06-09 13:36:53 +02:00
parent fe2839b95b
commit 7340ac59e0

View file

@ -1630,7 +1630,8 @@ void Client::setOnActivities(QStringList newActivitiesList)
newActivitiesList = joinedActivitiesList.split(',', QString::SkipEmptyParts); newActivitiesList = joinedActivitiesList.split(',', QString::SkipEmptyParts);
QStringList allActivities = workspace()->activityList(); QStringList allActivities = workspace()->activityList();
if (newActivitiesList.size() == allActivities.size() || newActivitiesList.isEmpty() || if ( newActivitiesList.isEmpty() ||
(newActivitiesList.count() > 1 && newActivitiesList.count() == allActivities.count()) ||
(newActivitiesList.count() == 1 && newActivitiesList.at(0) == "ALL")) { (newActivitiesList.count() == 1 && newActivitiesList.at(0) == "ALL")) {
activityList.clear(); activityList.clear();
XChangeProperty(display(), window(), atoms->activities, XA_STRING, 8, XChangeProperty(display(), window(), atoms->activities, XA_STRING, 8,