This commit is contained in:
Uli Schlachter 2016-05-09 18:40:35 +02:00
commit 4c9280d2bb
2 changed files with 2 additions and 2 deletions

View File

@ -86,7 +86,7 @@ end
-- @param x The x coordinate -- @param x The x coordinate
-- @param y The y coordinate -- @param y The y coordinate
function screen.getbycoord(x, y) function screen.getbycoord(x, y)
local s = capi.screen[1] local s = capi.screen.primary
local dist = screen.object.get_square_distance(s, x, y) local dist = screen.object.get_square_distance(s, x, y)
for i in capi.screen do for i in capi.screen do
local d = screen.object.get_square_distance(i, x, y) local d = screen.object.get_square_distance(i, x, y)

View File

@ -35,7 +35,7 @@ local function screen_getbycoord(x, y)
return capi.screen[i] return capi.screen[i]
end end
end end
return capi.screen[1] return capi.screen.primary
end end
-- Get the widget context. This should always return the same table (if -- Get the widget context. This should always return the same table (if