From e298353583aee980c3f171e4d9fe0d3206a14393 Mon Sep 17 00:00:00 2001 From: Julien Danjou Date: Mon, 24 Aug 2009 08:31:44 +0200 Subject: [PATCH] awful.tag: view{next,prev} take screen as argument Signed-off-by: Julien Danjou --- lib/awful/tag.lua.in | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/lib/awful/tag.lua.in b/lib/awful/tag.lua.in index b216283c5..86cb47c6a 100644 --- a/lib/awful/tag.lua.in +++ b/lib/awful/tag.lua.in @@ -216,7 +216,8 @@ end -- @param i The relative index to see. -- @param screen Optional screen number. function viewidx(i, screen) - local tags = capi.screen[screen or capi.mouse.screen]:tags() + local screen = scree or capi.mouse.screen + local tags = capi.screen[screen]:tags() local showntags = {} for k, t in ipairs(tags) do if not getproperty(t, "hide") then @@ -233,13 +234,15 @@ function viewidx(i, screen) end --- View next tag. This is the same as tag.viewidx(1). -function viewnext() - return viewidx(1) +-- @param screen The screen number. +function viewnext(screen) + return viewidx(1, screen) end --- View previous tag. This is the same a tag.viewidx(-1). -function viewprev() - return viewidx(-1) +-- @param screen The screen number. +function viewprev(screen) + return viewidx(-1, screen) end --- View only a tag.