tags: ensure we can send a client to a new tag

When creating a tag, the current client may lose focus. We put it in a
variable to be able to move it when the tag is created.
This commit is contained in:
Vincent Bernat 2012-09-11 02:21:29 +02:00
parent f84187228d
commit c897b8c837

View file

@ -125,9 +125,10 @@ for i = 1, (shifty.config.maxtags or 9) do
i == 5 and "Toggle display of this tag" or nil),
awful.key({ modkey, "Shift" }, i,
function ()
if client.focus then
local c = client.focus
if c then
local t = shifty.getpos(i)
awful.client.movetotag(t)
awful.client.movetotag(t, c)
end
end,
i == 5 and "Move window to this tag" or nil),