1

So, I've encountered a problem where Alacritty loses its focus upon being spawned. Say I have my browser open, I open Kate on top of that, it gains focus, but when I open Alacritty, it gains focus upon spawning, but then goes back to the last focused window (in this case Kate). This is really hard to notice, but if you use a brighter color of focused window or one that stands out, you can notice it. So far only noticed that with Alacritty, and with my limited knowledge about Awesome and Lua, I did something like this:

 client.connect_signal("request::manage", function(c)
 c:emit_signal("request::activate", {raise = false})
 end)

but it also doesn't help it. I also have disabled "sloppy focus" (commented out), because I don't like it, but when I use it, it gives the focus to Alacritty normally, with no issues. Say my Alacritty spawns at x=500 y=250, and my cursor is at x=20 y=15 (out of focus even when it spawns), Alacritty does gain the focus, but again, when I remove sloppy focus, it no longer gets the focus.

Is there something I'm missing or is it just bugged? Sloppy focus literally fixes that issue, but I don't want to use sloppy focus because my mouse often flies on my desk for various reasons (typically because I'm stupid and hit it while grabbing something etc) and hence my focus swaps constantly.

Balthasar
  • 21
  • 1
  • I realized what I did wrong. All I had to do is to add "c:emit_signal("request::activate", "mouse_enter", {raise = false}) " right into the function below comment "-- Signal function to execute when a new client appears.", before the end of that function. Now everything works as I want it to. – Balthasar Dec 29 '21 at 20:14
  • 1
    Hello. Can you mark the question as answered or create an answer to your own question and approve the answer? So just it doesn't stay in the unanswered queue for ever? This is just to make triaging easier for the people subscribing to the `awesome-wm` StackOverflow tag. Thanks – Emmanuel Lepage Vallee Jan 07 '22 at 10:47

0 Answers0