Fix awful.screen.focus

This is broken since 23b2fae6a9.

Closes https://github.com/awesomeWM/awesome/pull/516.

Signed-off-by: Uli Schlachter <psychon@znc.in>
This commit is contained in:
Uli Schlachter 2015-10-11 12:44:28 +02:00 committed by Daniel Hahler
parent 33f8a06594
commit 0060ea9d63
1 changed files with 1 additions and 0 deletions

View File

@ -60,6 +60,7 @@ function screen.focus(_screen)
if not screen.mouse_per_screen[_screen] then if not screen.mouse_per_screen[_screen] then
-- This is the first time we enter this screen, -- This is the first time we enter this screen,
-- keep relative mouse position on the new screen -- keep relative mouse position on the new screen
pos = capi.mouse.coords()
local relx = (pos.x - capi.screen[s].geometry.x) / capi.screen[s].geometry.width local relx = (pos.x - capi.screen[s].geometry.x) / capi.screen[s].geometry.width
local rely = (pos.y - capi.screen[s].geometry.y) / capi.screen[s].geometry.height local rely = (pos.y - capi.screen[s].geometry.y) / capi.screen[s].geometry.height