diff options
author | Peter Palfrader <peter@palfrader.org> | 2019-09-22 10:45:22 +0200 |
---|---|---|
committer | Peter Palfrader <peter@palfrader.org> | 2019-09-22 10:45:22 +0200 |
commit | 9059e67cfade53526528139ff4d1d8762494d299 (patch) | |
tree | 2f58375c0363831204f762cffb83a6e646437cac | |
parent | 9c8d71afaee686c96033ee968dfa44e76d476497 (diff) |
Another attempt to get the focus on tag-switch to work
-rw-r--r-- | config/awesome/rc.lua | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/config/awesome/rc.lua b/config/awesome/rc.lua index a9cb8ac..fd3e26c 100644 --- a/config/awesome/rc.lua +++ b/config/awesome/rc.lua @@ -702,15 +702,13 @@ client.connect_signal("unfocus", function(c) c.border_color = beautiful.border_n -- -- from/inspired by https://stackoverflow.com/a/30684548 do_not_reset_focus = false -previous_tag = nil tag.connect_signal( "property::selected", function (t) - local selected = tostring(t.selected) == "false" - if selected then - if not t == previous_tag and not do_not_reset_focus then - local focus_timer = gears.timer( - { timeout = 0.05, + if t.selected then + if not do_not_reset_focus then + focus_timer = gears.timer( + { timeout = 0.001, autostart = true, callback = function() local c = mouse.current_client @@ -721,10 +719,8 @@ tag.connect_signal( end } ) - focus_timer:start() end do_not_reset_focus = false - previous_tag = t end end ) |