diff options
author | Anton Khirnov <anton@khirnov.net> | 2023-05-05 10:47:20 +0200 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2023-05-05 10:47:20 +0200 |
commit | 4297b1b03f6bf301e8096bee6a433e5fb3c5c5be (patch) | |
tree | 2bd0693618a2d5ef41bec190af7376ff7068feec | |
parent | 3c62f2d59a7319aef2eedbe0d2c6cc8bb9f87f03 (diff) |
rc: use pcall for delayed focusing new clients
They might immediately disappear and be gone by the time the delayed
call is executed - using pcall suppresses the exception.
-rw-r--r-- | rc.lua | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -201,7 +201,8 @@ client.connect_signal("manage", function (c, startup) -- give the new client focus if c.focusable then - gears.timer.delayed_call(function(c) c:jump_to(false) end, c) + -- use pcall() because the client might be gone by the time we get to it + gears.timer.delayed_call(pcall, function() c:jump_to(false) end) end end) |