Use focus.filter in awful.client.focus.(global_)bydirection

This commit is contained in:
Marvin Ewald 2020-12-12 22:59:55 +01:00
parent 86b6c49a0f
commit 76e3cc4799
1 changed files with 6 additions and 2 deletions

View File

@ -174,8 +174,10 @@ function focus.bydirection(dir, c, stacked)
local cltbl = client.visible(sel.screen, stacked) local cltbl = client.visible(sel.screen, stacked)
local geomtbl = {} local geomtbl = {}
for i,cl in ipairs(cltbl) do for i,cl in ipairs(cltbl) do
if focus.filter(cl) then
geomtbl[i] = cl:geometry() geomtbl[i] = cl:geometry()
end end
end
local target = grect.get_in_direction(dir, geomtbl, sel:geometry()) local target = grect.get_in_direction(dir, geomtbl, sel:geometry())
@ -211,8 +213,10 @@ function focus.global_bydirection(dir, c, stacked)
local cltbl = client.visible(screen.focused(), stacked) local cltbl = client.visible(screen.focused(), stacked)
local geomtbl = {} local geomtbl = {}
for i,cl in ipairs(cltbl) do for i,cl in ipairs(cltbl) do
if focus.filter(cl) then
geomtbl[i] = cl:geometry() geomtbl[i] = cl:geometry()
end end
end
local target = grect.get_in_direction(dir, geomtbl, scr.geometry) local target = grect.get_in_direction(dir, geomtbl, scr.geometry)
if target then if target then