fix clients missing WM_CLASS property throwing errors

This commit is contained in:
BZ 2021-02-02 17:37:17 +01:00
parent 2a73dd0264
commit 5fc78b6dce
1 changed files with 2 additions and 1 deletions

View File

@ -188,8 +188,9 @@ function module.menu_client(custom_menu, c)
end
end
local class = c.class or ""
for regex, entries in pairs(custom_menu) do
if string.find(c.class, regex) then
if string.find(class, regex) then
for _, e in ipairs(entries) do
local menu_entry = generate_menu_entry(e)
if menu_entry then