awful: check for selected

Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
Julien Danjou 2008-08-08 17:07:31 +02:00
parent 2900127619
commit eb2eb9c30b
1 changed files with 6 additions and 4 deletions

View File

@ -487,10 +487,12 @@ end
-- @para c Optional client to move, otherwise the focused one is used.
function client.movetotag(target, c)
local sel = c or capi.client.focus_get();
-- Check that tag and client screen are identical
if sel.screen ~= target.screen then return end
local tags = { target }
sel.tags = tags
if sel then
-- Check that tag and client screen are identical
if sel.screen ~= target.screen then return end
local tags = { target }
sel.tags = tags
end
end
--- Toggle a tag on a client.