diff --git a/libtaskmanager/abstracttasksmodel.h b/libtaskmanager/abstracttasksmodel.h --- a/libtaskmanager/abstracttasksmodel.h +++ b/libtaskmanager/abstracttasksmodel.h @@ -83,8 +83,8 @@ ScreenGeometry, /**< Screen geometry for the task (i.e. the window's screen). */ Activities, /**< Activities for the task (i.e. window). */ IsDemandingAttention, /**< Task is demanding attention. */ - SkipTaskbar, /**< Task desires not to be shown in a 'task bar' user interface. */ - SkipPager, /**< Task desires not to be shown in a 'pager' user interface. */ + SkipTaskbar, /**< Task should not be shown in a 'task bar' user interface. */ + SkipPager, /**< Task should not to be shown in a 'pager' user interface. */ }; explicit AbstractTasksModel(QObject *parent = nullptr); diff --git a/libtaskmanager/taskfilterproxymodel.h b/libtaskmanager/taskfilterproxymodel.h --- a/libtaskmanager/taskfilterproxymodel.h +++ b/libtaskmanager/taskfilterproxymodel.h @@ -214,42 +214,42 @@ void setFilterNotMinimized(bool filter); /** - * Whether tasks which indicate they want to be omitted from 'task bars' - * should be filtered. Defaults to @c true. + * Whether tasks which should be omitted from 'task bars' should be + * filtered. Defaults to @c true. * * @see setFilterSkipTaskbar - * @returns @c true if tasks which want to skip the 'task bar' should be - * filtered. + * @returns @c true if tasks which should not be on the 'task bar' + * should be filtered. **/ bool filterSkipTaskbar() const; /** - * Set whether tasks which indicate they want to be omitted from 'task bars' - * should be filtered. + * Set whether tasks which should be omitted from 'task bars' should be + * filtered. * * @see filterSkipTaskbar - * @param filter Whether tasks which want to skip the 'task bar' should be - * filtered. + * @param filter Whether tasks whichs should not be on the 'task bar' + * should be filtered. **/ void setFilterSkipTaskbar(bool filter); /** - * Whether tasks which indicate they want to be omitted from 'pagers' - * should be filtered. Defaults to @c true. + * Whether tasks which should be omitted from 'pagers' should be + * filtered. Defaults to @c true. * * @see setFilterSkipPager - * @returns @c true if tasks which want to skip the 'pager' should be - * filtered. + * @returns @c true if tasks which should not be on the 'pager' should + * be filtered. **/ bool filterSkipPager() const; /** - * Set whether tasks which indicate they want to be omitted from 'pagers' - * should be filtered. + * Set whether tasks which should be omitted from 'pagers' should be + * filtered. * * @see filterSkipPager - * @param filter Whether tasks which want to skip the 'pager' should be - * filtered. + * @param filter Whether tasks which should not be on the 'pager' should + * be filtered. **/ void setFilterSkipPager(bool filter); diff --git a/libtaskmanager/xwindowtasksmodel.cpp b/libtaskmanager/xwindowtasksmodel.cpp --- a/libtaskmanager/xwindowtasksmodel.cpp +++ b/libtaskmanager/xwindowtasksmodel.cpp @@ -362,6 +362,11 @@ changedRoles << IsShaded << IsDemandingAttention << SkipTaskbar << SkipPager; } + if (properties & NET::WMWindowType) { + wipeInfoCache = true; + changedRoles << SkipTaskbar; + } + if (properties2 & NET::WM2AllowedActions) { wipeInfoCache = true; changedRoles << IsClosable << IsMovable << IsResizable << IsMaximizable << IsMinimizable; @@ -904,7 +909,10 @@ } else if (role == IsDemandingAttention) { return d->demandsAttention(window); } else if (role == SkipTaskbar) { - return d->windowInfo(window)->hasState(NET::SkipTaskbar); + const KWindowInfo *info = d->windowInfo(window); + // _NET_WM_WINDOW_TYPE_UTILITY type windows should not be on task bars, + // but they should be shown on pagers. + return (info->hasState(NET::SkipTaskbar) || info->windowType(NET::UtilityMask) == NET::Utility); } else if (role == SkipPager) { return d->windowInfo(window)->hasState(NET::SkipPager); }