Check factory when window is unmanaged

This ensures the factory is properly cleaned up.
This commit is contained in:
James Reed 2020-08-19 10:17:21 -06:00
parent 0f9dc85b09
commit da2caa7315
No known key found for this signature in database
GPG Key ID: 0BE2BD33C5E8125E
1 changed files with 7 additions and 0 deletions

View File

@ -35,6 +35,12 @@ awful.rules.add_rule_source("launch",
table.insert(callbacks, data.callback)
end
if data.factory then
c:connect_signal("request::unmanage", function ()
awful.spawn("wm-launchd -check " .. data.factory)
end)
end
shared.pending[id] = nil
launch.widget.update_widgets()
end)
@ -130,6 +136,7 @@ local function spawn(cmd, args)
local launch_cmd = "wm-launch"
if args.factory then
data.factory = args.factory
launch_cmd = launch_cmd .. " -f " .. args.factory
end