From 6890eea8d6d9c73c9b63c1b4b889d5a3fe67000e Mon Sep 17 00:00:00 2001 From: Eduard Bloch Date: Sun, 13 Oct 2024 11:16:01 +0200 Subject: [PATCH] App name filter shall consider the command line too --- src/fdomenu.cc | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/fdomenu.cc b/src/fdomenu.cc index 6c85d4f77..2d85e5270 100644 --- a/src/fdomenu.cc +++ b/src/fdomenu.cc @@ -279,9 +279,12 @@ class DesktopFile { static DesktopFilePtr load_visible(string &&path, const string &lang) { try { auto ret = new DesktopFile(path, lang); - if (ret->NoDisplay || !userFilter(ret->Name.c_str(), false) || - !userFilter(ret->GetTranslatedName().c_str(), false)) { - // matched conditions to hide the desktop entry? + // matched conditions to hide the desktop entry? + if (ret->NoDisplay) + ret = nullptr; + else if (!userFilter(ret->Name.c_str(), false) && + !userFilter(ret->GetTranslatedName().c_str(), false) && + !userFilter(ret->GetCommand().c_str(), false)) { ret = nullptr; } else { if (add_comments) {