feat: identify more applications
This commit is contained in:
parent
aa7762c176
commit
36fa1781ea
1 changed files with 6 additions and 0 deletions
|
@ -106,6 +106,7 @@ QString Utils::desktopPathFromMetadata(const QString &appId, quint32 pid, const
|
|||
// Start search.
|
||||
const QFileInfo desktopFileInfo(item->path);
|
||||
|
||||
bool isExecPath = QFile::exists(item->exec);
|
||||
bool founded = false;
|
||||
|
||||
if (item->exec == command || item->exec == commandName) {
|
||||
|
@ -142,6 +143,11 @@ QString Utils::desktopPathFromMetadata(const QString &appId, quint32 pid, const
|
|||
if (!founded && desktopFileInfo.baseName().startsWith(xWindowWMClassName, Qt::CaseInsensitive))
|
||||
founded = true;
|
||||
|
||||
// For exec path.
|
||||
if (isExecPath && !founded && (command.contains(item->exec) || commandName.contains(item->exec))) {
|
||||
founded = true;
|
||||
}
|
||||
|
||||
if (founded) {
|
||||
result = item->path;
|
||||
break;
|
||||
|
|
Loading…
Reference in a new issue