awful: toggletag: check that tag and client screen are identical

Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
Julien Danjou 2008-07-28 16:09:01 +02:00
parent 354af424ba
commit 7419a99827

View file

@ -283,9 +283,9 @@ end
-- @para c Optional client to move, otherwise the focused one is used.
function P.client.movetotag(target, c)
local sel = c or client.focus_get();
-- Check that tag and client screen are identical
if sel.screen ~= target.screen then return end
local tags = tag.get(sel.screen)
-- Check that tags and client screen are identical
for k, t in pairs(tags) do
sel:tag(t, false)
end
@ -297,6 +297,8 @@ end
-- @param c Optional client to toggle, otherwise the focused one is used.
function P.client.toggletag(target, c)
local sel = c or client.focus_get();
-- Check that tag and client screen are identical
if sel.screen ~= target.screen then return end
local toggle = false
if sel then
-- Count how many tags has the client