client.focus.history.get: use stacking order
This should make it faster in general, and provides a better fallback in case nothing was found. Ref: https://github.com/awesomeWM/awesome/pull/526
This commit is contained in:
parent
208db47b2d
commit
3da2508ace
|
@ -181,7 +181,7 @@ end
|
||||||
function client.focus.history.get(screen, idx, filter)
|
function client.focus.history.get(screen, idx, filter)
|
||||||
-- When this counter is equal to idx, we return the client
|
-- When this counter is equal to idx, we return the client
|
||||||
local counter = 0
|
local counter = 0
|
||||||
local vc = client.visible(screen)
|
local vc = client.visible(screen, true)
|
||||||
for k, c in ipairs(client.data.focus) do
|
for k, c in ipairs(client.data.focus) do
|
||||||
if c.screen == screen then
|
if c.screen == screen then
|
||||||
if not filter or filter(c) then
|
if not filter or filter(c) then
|
||||||
|
|
Loading…
Reference in New Issue