Commit a057edc7 authored by Eike Hein's avatar Eike Hein

Re-filter launcher when a window changes identity

LibreOffice reuses the same main window for both its start center and
sub-apps like Writer launched from it, changing the window metadata on
the fly. This ensures we hide e.g. a launcher for Writer when picking
it in the LO start center.

Reviewers: broulik

Subscribers: plasma-devel

Tags: #plasma

Differential Revision:
parent b15eaf38
......@@ -457,6 +457,28 @@ void TasksModel::Private::initModels()
if (roles.isEmpty() || roles.contains(AbstractTasksModel::IsDemandingAttention)) {
if (roles.isEmpty() || roles.contains(AbstractTasksModel::AppId)) {
for (int i = topLeft.row(); i <= bottomRight.row(); ++i) {
const QModelIndex &sourceIndex = groupingProxyModel->index(i, 0);
// When a window task changes identity to one we have a launcher for, cause
// the launcher to be re-filtered.
if ( {
for (int i = 0; i < filterProxyModel->rowCount(); ++i) {
const QModelIndex &filterIndex = filterProxyModel->index(i, 0);
if (! {
if (appsMatch(sourceIndex, filterIndex)) {
filterProxyModel->dataChanged(filterIndex, filterIndex);
Markdown is supported
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