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
1 changed files with 3 additions and 1 deletions

View File

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