quake: if quake console is closed, mark it as not visible

This commit is contained in:
Vincent Bernat 2012-07-15 12:54:34 +02:00
parent 3b3dd0863d
commit 8e2afdd778
2 changed files with 8 additions and 2 deletions

View file

@ -127,10 +127,16 @@ function QuakeConsole:new(config)
local console = setmetatable(config, { __index = QuakeConsole })
capi.client.add_signal("manage",
function(c)
if c.name == console.name and c.screen == console.screen then
if c.icon_name == console.name and c.screen == console.screen then
console:display()
end
end)
capi.client.add_signal("unmanage",
function(c)
if c.icon_name == console.name and c.screen == console.screen then
console.visible = false
end
end)
local reattach = capi.timer { timeout = 0 }
reattach:add_signal("timeout",