mirror of
https://github.com/vincentbernat/i3wm-configuration.git
synced 2025-06-30 13:24:21 +02:00
bindings: fix toggle_window() function
There was a potential infinite loop because we didn't walk the stack correctly.
This commit is contained in:
parent
a89042b5d3
commit
ed8adcd4c4
1 changed files with 2 additions and 1 deletions
|
@ -58,12 +58,13 @@ local function toggle_window(filter)
|
||||||
local cl, t = unpack(undo[i])
|
local cl, t = unpack(undo[i])
|
||||||
-- We only handle visible clients that are attached to the
|
-- We only handle visible clients that are attached to the
|
||||||
-- appropriate tag. Otherwise, we try the next one.
|
-- appropriate tag. Otherwise, we try the next one.
|
||||||
if cl and cl:isvisible() and
|
if cl and cl:isvisible() and t.selected and
|
||||||
awful.util.table.hasitem(cl:tags(), t) then
|
awful.util.table.hasitem(cl:tags(), t) then
|
||||||
awful.client.toggletag(t, cl)
|
awful.client.toggletag(t, cl)
|
||||||
table.remove(undo, i)
|
table.remove(undo, i)
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
i = i - 1
|
||||||
end
|
end
|
||||||
-- Clean up...
|
-- Clean up...
|
||||||
while #undo > 10 do
|
while #undo > 10 do
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue