Makes awful.client.restore return the restored client

If some client is restored, returns it, otherwise returns nil.

Signed-off-by: Uli Schlachter <psychon@znc.in>
This commit is contained in:
Abdó Roig-Maranges 2012-09-14 14:32:06 +02:00 committed by Uli Schlachter
parent c1addbbf72
commit 98185eb123
1 changed files with 4 additions and 4 deletions

View File

@ -666,7 +666,7 @@ end
--- Restore (=unminimize) a random client.
-- @param s The screen to use.
-- @return True if some client was restored.
-- @return The restored client if some client was restored, otherwise nil.
function client.restore(s)
local s = s or (capi.client.focus and capi.client.focus.screen) or capi.mouse.screen
local cls = capi.client.get(s)
@ -678,12 +678,12 @@ function client.restore(s)
for k, t in ipairs(tags) do
if util.table.hasitem(ctags, t) then
c.minimized = false
return true
return c
end
end
end
end
return false
return nil
end
-- Normalize a set of numbers to 1