mirror of
https://git.outfoxxed.me/quickshell/quickshell.git
synced 2026-04-10 06:11:54 +10:00
core/command: filter instance selection by current display
This commit is contained in:
parent
1e8cc2e78d
commit
00858812f2
9 changed files with 50 additions and 9 deletions
|
|
@ -411,7 +411,7 @@ bool QsPaths::checkLock(const QString& path, InstanceLockInfo* info, bool allowD
|
|||
}
|
||||
|
||||
QPair<QVector<InstanceLockInfo>, QVector<InstanceLockInfo>>
|
||||
QsPaths::collectInstances(const QString& path) {
|
||||
QsPaths::collectInstances(const QString& path, const QString& display) {
|
||||
qCDebug(logPaths) << "Collecting instances from" << path;
|
||||
auto liveInstances = QVector<InstanceLockInfo>();
|
||||
auto deadInstances = QVector<InstanceLockInfo>();
|
||||
|
|
@ -425,6 +425,11 @@ QsPaths::collectInstances(const QString& path) {
|
|||
qCDebug(logPaths).nospace() << "Found instance " << info.instance.instanceId << " (pid "
|
||||
<< info.pid << ") at " << path;
|
||||
|
||||
if (!display.isEmpty() && info.instance.display != display) {
|
||||
qCDebug(logPaths) << "Skipped instance with mismatched display at" << path;
|
||||
continue;
|
||||
}
|
||||
|
||||
if (info.pid == -1) {
|
||||
deadInstances.push_back(info);
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue