[awful] Add a check in toggletag

Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
Julien Danjou 2008-06-10 11:51:36 +02:00
parent 43fee02a5b
commit cd825b36c0
1 changed files with 10 additions and 1 deletions

View File

@ -225,7 +225,16 @@ end
function client_toggletag(target, c)
local sel = c or client.focus_get();
if sel then
local toggle = false
-- Count how many tags has the client
-- an only toggle tag if the client has at least one tag other than target
for k, v in ipairs(tag.get(sel:screen_get())) do
if target ~= v and sel:istagged(v) then
toggle = true
break
end
end
if toggle and sel then
sel:tag(target, not sel:istagged(target))
end
end