Check for non-empty utils.wm_name before checking OnlyShowIn attribute
Signed-off-by: Michael Perlov <perlovka@gmail.com>
This commit is contained in:
parent
cbb8f41261
commit
b487826719
|
@ -350,11 +350,12 @@ function utils.parse_desktop_file(file)
|
|||
-- Only check these values is NoDisplay is true (or non-existent)
|
||||
|
||||
-- Only show the program if there is no OnlyShowIn attribute
|
||||
-- or if it contains wm_name
|
||||
-- or if it contains wm_name or wm_name is empty
|
||||
if utils.wm_name ~= "" then
|
||||
if program.OnlyShowIn then
|
||||
program.show = false -- Assume false until found
|
||||
for _, wm in ipairs(program.OnlyShowIn) do
|
||||
if wm:match(utils.wm_name) then
|
||||
if wm == utils.wm_name then
|
||||
program.show = true
|
||||
break
|
||||
end
|
||||
|
@ -362,6 +363,7 @@ function utils.parse_desktop_file(file)
|
|||
else
|
||||
program.show = true
|
||||
end
|
||||
end
|
||||
|
||||
-- Only need to check NotShowIn if the program is being shown
|
||||
if program.show and program.NotShowIn then
|
||||
|
|
Loading…
Reference in New Issue