Git commit c34550cf4a7e93a5e14e882b01f7ab0cb24936ec by Eike Hein. Committed on 30/09/2015 at 23:03. Pushed by hein into branch 'master'. Fix utility windows not being removed from task tree after demands-attentio= n state is cleared. Utilility windows are typically omitted from the task tree, unless they are in demands-attention state. SVN r901886 (cf. bug 178509 from 2008) introduced a bug by preventing tasks included in this fashion from reaching active state, causing the demands-attention state not to ever be cleared. Additionally, a separate bug prevented utility windows losing demands-attention state from being removed from the task tree thereafter. This patch fixes both. This cropped up with recent versions of The Gimp, which curiously sets its utility windows to demand attention when opened from within the app. Since windows demanding attention are also implicitly exemped from grouping, this appeared to users as a failure of the grouping logic. BUG:352477 CCBUG:178509 M +6 -4 libtaskmanager/groupmanager.cpp M +1 -1 libtaskmanager/taskmanager.cpp http://commits.kde.org/plasma-workspace/c34550cf4a7e93a5e14e882b01f7ab0cb24= 936ec diff --git a/libtaskmanager/groupmanager.cpp b/libtaskmanager/groupmanager.= cpp index 1a2b22c..fb2c28d 100644 --- a/libtaskmanager/groupmanager.cpp +++ b/libtaskmanager/groupmanager.cpp @@ -640,10 +640,12 @@ void GroupManagerPrivate::taskChanged(::TaskManager::= Task *task, ::TaskManager:: } = if (changes & ::TaskManager::AttentionChanged) { - // we show tasks anyway if they demand attention - // so whenever our state changes ... try to re-adjust it - takeAction =3D true; - show =3D true; + if (task->demandsAttention()) { + takeAction =3D true; + show =3D true; + } else if (task->info().windowType(NET::UtilityMask) =3D=3D NET::U= tility) { + removeTask(task); + } } = // Some apps, eg. LibreOffice, change classClass/className after start= -up... diff --git a/libtaskmanager/taskmanager.cpp b/libtaskmanager/taskmanager.cpp index 3418e49..4396401 100644 --- a/libtaskmanager/taskmanager.cpp +++ b/libtaskmanager/taskmanager.cpp @@ -396,7 +396,7 @@ void TaskManager::activeWindowChanged(WId w) } //qDebug() << "no active window"; } else { - if (t->info().windowType(NET::UtilityMask) =3D=3D NET::Utility) { + if (t->info().windowType(NET::UtilityMask) =3D=3D NET::Utility && = !t->demandsAttention()) { // we don't want to mark utility windows as active since task = managers // actually care about the main window and skip utility window= s; utility // windows are hidden when their associated window loses focus= anyways