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