Move cursor when focus change screen (fix #13)

This commit is contained in:
Emmanuel Lepage Vallee 2015-03-29 20:54:56 -04:00
parent eb1a6a1b6c
commit 7672d3f26a
1 changed files with 4 additions and 0 deletions

View File

@ -163,8 +163,12 @@ local function bydirection(dir, c, swap,max)
capi.client.focus = nil --TODO Fix upstream fix
capi.mouse.screen = capi.screen[cl.screen]
else
local old_src = capi.client.focus and capi.client.focus.screen
capi.client.focus = cltbl[((not cl and #cltbl == 1) and 1 or target)]
capi.client.focus:raise()
if old_src and capi.client.focus.screen ~= old_src then
capi.mouse.coords(capi.client.focus:geometry())
end
end
end
else