awful.screen: Fix addition between object and number

Fix #784
This commit is contained in:
Emmanuel Lepage Vallee 2016-03-28 04:35:16 -04:00
parent e8c7e573cb
commit 995361449a
2 changed files with 2 additions and 2 deletions

View File

@ -559,7 +559,7 @@ function client.movetoscreen(c, s)
if sel then
local sc = capi.screen.count()
if not s then
s = sel.screen + 1
s = sel.screen.index + 1
end
if type(s) == "number" and s > sc then s = 1 elseif s < 1 then s = sc end
s = get_screen(s)

View File

@ -143,7 +143,7 @@ end
-- @param i Value to add to the current focused screen index. 1 will focus next
-- screen, -1 would focus the previous one.
function screen.focus_relative(i)
return screen.focus(util.cycle(capi.screen.count(), screen.focused() + i))
return screen.focus(util.cycle(capi.screen.count(), screen.focused().index + i))
end
--- Get or set the screen padding.