From 995361449a4b587f172c5a8d725a4d4589183621 Mon Sep 17 00:00:00 2001 From: Emmanuel Lepage Vallee Date: Mon, 28 Mar 2016 04:35:16 -0400 Subject: [PATCH] awful.screen: Fix addition between object and number Fix #784 --- lib/awful/client.lua | 2 +- lib/awful/screen.lua | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/awful/client.lua b/lib/awful/client.lua index 1cfd1616..1593be8a 100644 --- a/lib/awful/client.lua +++ b/lib/awful/client.lua @@ -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) diff --git a/lib/awful/screen.lua b/lib/awful/screen.lua index 1ae21d81..2855d902 100644 --- a/lib/awful/screen.lua +++ b/lib/awful/screen.lua @@ -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.