From adc91aa37afdaf381ea97b565e7c87c4287b71da Mon Sep 17 00:00:00 2001 From: Julien Danjou Date: Mon, 29 Dec 2008 11:51:46 +0100 Subject: [PATCH] awful.client: check client with filter in history fallback Signed-off-by: Julien Danjou --- lib/awful/client.lua.in | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/awful/client.lua.in b/lib/awful/client.lua.in index 4cf9c08e..c4f8968e 100644 --- a/lib/awful/client.lua.in +++ b/lib/awful/client.lua.in @@ -156,8 +156,13 @@ function focus.history.get(screen, idx) end end -- Argh nobody found in history, give the first one visible if there is one + -- that passes the filter. if counter == 0 then - return vc[1] + for k, v in ipairs(vc) do + if focus.filter(v) then + return v + end + end end end