# HG changeset patch # User Fabien Ninoles # Date 1420302096 18000 # Node ID 56e80afa3e1ca760b5002f3fbe9c0c2e962a3a8c # Parent 0eae48be1d6227b5c016a1a84c6350bbcc86b513 Only start sloppy timer on a mouse_enter. This avoid a bug when the focus is stolen by another window. diff -r 0eae48be1d62 -r 56e80afa3e1c awesome/my.lua --- a/awesome/my.lua Fri Jan 02 21:50:10 2015 -0500 +++ b/awesome/my.lua Sat Jan 03 11:21:36 2015 -0500 @@ -282,7 +282,12 @@ awful.client.focus.filter(c) and awful.layout.get(c.screen) ~= awful.layout.suit.magnifier then - sloppy_timer:again() + if sloppy_timer.started + then + sloppy_timer:again() + else + sloppy_timer:start() + end sloppy_last_client = c end end @@ -295,6 +300,7 @@ c == sloppy_last_client then capi.client.focus = c + sloppy_timer:stop() end end end @@ -310,4 +316,5 @@ capi.client.add_signal("manage", function (c) c:add_signal("mouse::enter", sloppy_mouse_enter) end) + capi.client.add_signal("focus", function () sloppy_timer:stop() end) end