Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Commit 140c65f2 authored by Eike Hein's avatar Eike Hein

Expose PlasmaWindow::pid through WaylandTasksModel.

Summary: Depends on D5747.

Reviewers: #plasma, davidedmundson, sebas

Subscribers: plasma-devel

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D5755
parent 5324f52e
......@@ -85,7 +85,12 @@ public:
IsDemandingAttention, /**< Task is demanding attention. */
SkipTaskbar, /**< Task should not be shown in a 'task bar' user interface. */
SkipPager, /**< Task should not to be shown in a 'pager' user interface. */
AppPid, /**< Application Process ID */
AppPid, /**< Application Process ID. This is provided best-effort, and may not
be what you expect: For window tasks owned by processes started
from e.g. kwin_wayland, it would be the process id of kwin
itself. DO NOT use this for destructive actions such as closing
the application. The intended use case is to try and (smartly)
gather more information about the task when needed. */
};
Q_ENUM(AdditionalRoles)
......
......@@ -226,6 +226,10 @@ void WaylandTasksModel::Private::addWindow(KWayland::Client::PlasmaWindow *windo
QObject::connect(window, &KWayland::Client::PlasmaWindow::skipTaskbarChanged, q,
[window, this] { this->dataChanged(window, SkipTaskbar); }
);
QObject::connect(window, &KWayland::Client::PlasmaWindow::pidChanged, q,
[window, this] { this->dataChanged(window, AppPid); }
);
}
AppData WaylandTasksModel::Private::appData(KWayland::Client::PlasmaWindow *window)
......@@ -333,7 +337,7 @@ QVariant WaylandTasksModel::data(const QModelIndex &index, int role) const
} else if (role == SkipPager) {
// FIXME Implement.
} else if (role == AppPid) {
// FIXME Implement.
return window->pid();
}
return QVariant();
......
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