Add a snipplet for mouse warping.

Signed-off-by: Pierre Habouzit <madcoder@debian.org>
This commit is contained in:
Pierre Habouzit 2008-06-19 12:19:10 +02:00
parent 4360fc51b2
commit 2d8d50f2c1
1 changed files with 14 additions and 0 deletions

View File

@ -330,6 +330,20 @@ end
function hook_arrange(screen)
local layout = awful.layout.get(screen)
mylayoutbox[screen]:set("image", "@iconsdir@/layouts/" .. layout .. "w.png")
-- Uncomment if you want mouse warping
--[[
local sel = client.focus_get()
if sel then
local c_c = sel:coords_get()
local m_c = mouse.coords_get()
if m_c.x < c_c.x or m_c.x > c_c.x + c_c.width or
m_c.y < c_c.y or m_c.y > c_c.y + c_c.height then
mouse.coords_set(c_c.x + 1, c_c.y + 1)
end
end
]]
end
-- Hook called every second