I run IntelliJ IDEA & some other Java GUI apps on my linux box.

Every one of them tends to steal focus when launching up, and doing it in stealthy way. E.g.:

I run IDEA, it starts up in background, I start typing something in my browser. From some point, input starts going to IDEA, be it opened project in it, some window or anything. The worst part is that, while focused, the windows of IDEA still stay on the background, e.g. it looks like my browser started lagging & stopped recognizing my keyboard input.

Is there any way to stop this in Gnome Shell?

  • This isn't clean possible with X11. Any window can (but shouldn't) steal focus anytime. I can think of 2 hacks though. You or your window manager can automatically steal it back. Or, you could use some LD_PRELOAD like hack to remove the commands to steal focus (there are a very few), but I'm not sure how doable that is in Java. – TAAPSogeking Jun 2 '19 at 7:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.