Merge pull request #721 from Elv13/fix_awful_screen

awful.screen: Fix regression
This commit is contained in:
Emmanuel Lepage Vallée 2016-02-29 04:29:22 -05:00
commit 512e966be7
1 changed files with 3 additions and 3 deletions

View File

@ -17,7 +17,7 @@ local capi =
local util = require("awful.util")
local function get_screen(s)
return s and screen[s]
return s and capi.screen[s]
end
-- we use require("awful.client") inside functions to prevent circular dependencies.
@ -58,12 +58,12 @@ end
-- @param x The x coordinate
-- @param y The y coordinate
function screen.getbycoord(x, y)
local s = screen[1]
local s = capi.screen[1]
local dist = screen.getdistance_sq(s, x, y)
for i = 2, capi.screen:count() do
local d = screen.getdistance_sq(i, x, y)
if d < dist then
s, dist = screen[i], d
s, dist = capi.screen[i], d
end
end
return s.index