From 6dc32042084f03ca11e62f88ee618ad31a2ef2fc Mon Sep 17 00:00:00 2001 From: Julien Danjou Date: Wed, 23 Jul 2008 15:29:57 +0200 Subject: [PATCH] awesomerc: fix screen computing in window tagging Signed-off-by: Julien Danjou --- awesomerc.lua.in | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/awesomerc.lua.in b/awesomerc.lua.in index 2a2f5d5a0..4e54ad76f 100644 --- a/awesomerc.lua.in +++ b/awesomerc.lua.in @@ -186,16 +186,20 @@ for i = 1, keynumber do end):add() keybinding({ modkey, "Shift" }, i, function () - local screen = mouse.screen - if tags[screen][i] then - awful.client.movetotag(tags[screen][i]) + local sel = client.focus_get() + if sel then + if tags[sel.screen][i] then + awful.client.movetotag(tags[sel.screen][i]) + end end end):add() keybinding({ modkey, "Control", "Shift" }, i, function () - local screen = mouse.screen - if tags[screen][i] then - awful.client.toggletag(tags[screen][i]) + local sel = client.focus_get() + if sel then + if tags[sel.screen][i] then + awful.client.toggletag(tags[sel.screen][i]) + end end end):add() end