client.focus.byidx: handle raising in the function itself

This commit is contained in:
Daniel Hahler 2015-05-13 22:39:38 +02:00
parent ed09d8ed4f
commit 2e2d60a1f9
2 changed files with 1 additions and 5 deletions

View File

@ -161,11 +161,9 @@ mytasklist.buttons = awful.util.table.join(
end),
awful.button({ }, 4, function ()
awful.client.focus.byidx(1)
if client.focus then client.focus:raise() end
end),
awful.button({ }, 5, function ()
awful.client.focus.byidx(-1)
if client.focus then client.focus:raise() end
end))
for s = 1, screen.count() do
@ -229,12 +227,10 @@ globalkeys = awful.util.table.join(
awful.key({ modkey, }, "j",
function ()
awful.client.focus.byidx( 1)
if client.focus then client.focus:raise() end
end),
awful.key({ modkey, }, "k",
function ()
awful.client.focus.byidx(-1)
if client.focus then client.focus:raise() end
end),
awful.key({ modkey, }, "w", function () mymainmenu:show() end),

View File

@ -348,7 +348,7 @@ end
function client.focus.byidx(i, c)
local target = client.next(i, c)
if target then
target:emit_signal("request::activate", "client.focus.byidx", false)
target:emit_signal("request::activate", "client.focus.byidx", true)
end
end