awesome/my.lua
changeset 9 56e80afa3e1c
parent 8 0eae48be1d62
child 11 7226709dc4c4
--- 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