Commit b268a60f authored by Craig Drummond's avatar Craig Drummond
Browse files

When one, or more, members of a task group are on another activity then dont't...

When one, or more, members of a task group are on another activity then dont't use the present windows effect, fallback to the popup menu instead.
BUG:295516
parent 71f98996
......@@ -735,8 +735,21 @@ void TaskGroupItem::mouseReleaseEvent(QGraphicsSceneMouseEvent *event)
if (event->button() == Qt::LeftButton) {
if (Tasks::GC_MinMax != m_applet->groupClick() || event->modifiers() & Qt::ControlModifier) {
if ((event->modifiers()&Qt::ControlModifier || Tasks::GC_PresentWindows == m_applet->groupClick()) &&
KWindowSystem::compositingActive() && Plasma::WindowEffects::isEffectAvailable(Plasma::WindowEffects::PresentWindowsGroup)) {
bool usePresentWindows=(event->modifiers()&Qt::ControlModifier || Tasks::GC_PresentWindows == m_applet->groupClick()) &&
KWindowSystem::compositingActive() && Plasma::WindowEffects::isEffectAvailable(Plasma::WindowEffects::PresentWindowsGroup);
if (usePresentWindows) {
// Check all tasks are from this activity!
foreach (AbstractGroupableItem * groupable, m_group.data()->members()) {
TaskItem * item = dynamic_cast<TaskItem*>(groupable);
if (item && item->task() && !item->task()->isOnCurrentActivity()) {
usePresentWindows=false;
break;
}
}
}
if (usePresentWindows) {
QList<WId> ids;
foreach (AbstractGroupableItem * groupable, m_group.data()->members()) {
if (groupable->itemType() == TaskManager::GroupItemType) {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment