From c897b8c8373710a888aac0fe2a3590bbd30dcb2f Mon Sep 17 00:00:00 2001 From: Vincent Bernat Date: Tue, 11 Sep 2012 02:21:29 +0200 Subject: [PATCH] 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. --- rc/tags.lua | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/rc/tags.lua b/rc/tags.lua index 6f81d77..4bce1db 100644 --- a/rc/tags.lua +++ b/rc/tags.lua @@ -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),