From: Pierre Habouzit Date: Thu, 16 Apr 2009 21:46:14 +0000 (+0200) Subject: Reinstate mouse warping X-Git-Url: http://git.madism.org/?a=commitdiff_plain;h=afc4c55efa407ecc77430e0984a491eb8ee799b3;hp=0c62338c6dda2eabcd6b8f35a429b86b8cd8a325;p=~madcoder%2Fdotfiles.git Reinstate mouse warping Signed-off-by: Pierre Habouzit --- diff --git a/config/awesome/rc.lua b/config/awesome/rc.lua index 2fdd266..911ae13 100644 --- a/config/awesome/rc.lua +++ b/config/awesome/rc.lua @@ -471,18 +471,11 @@ awful.hooks.arrange.register(function (screen) sel = awful.client.focus.history.get(screen, 0) if sel then client.focus = sel end end - --[[ - if sel then - local m_c = mouse.coords() - - if m_c.x < sel.x - 1 or m_c.x > sel.x + sel.width + 1 or - m_c.y < sel.y - 1 or m_c.y > sel.y + sel.height + 1 then - if #m_c.buttons == 0 then - mouse.coords{x = sel.x + 5, y = sel.y + 5} - end - end + if sel and sel ~= mouse.object_under_pointer() then + local g = sel:geometry() + + mouse.coords { x = g.x + 5, y = g.y + 5 } end - ]]-- end) -- }}}