IDEA randomly steals focus while still in background


For the past couple of months I've had this weird problem. IntelliJ IDEA (IC-201.7846.6) is usually open idle in the background, but from time to time (averages at about once per day) it suddenly grabs focus but doesn't go to top. If I happened to be typing in another application, watching full screen video, or wherever, the keystrokes end up in the file open in IDEA instead of the foreground application, and I have to click the foreground application to re-grab focus. It seems it doesn't happen entirely random as I've seen a couple of times where it occurred after using IDEA and then doing something else for 15~30 minutes when it occurs. It happens on two different computers both running Ubuntu 18.04LTS.

I can't find a bug report but the problem is so vague that I cannot exclude it either. Has anyone else experienced similar things?




IDEA-106716 is not my problem as that one involves the window going to the foreground whereas in my case it stays hidden behind othe applications.

I see in the comments that someone got my symptoms after setting `suppress.focus.stealing=true` but I don't have that flag. (I have this flag how and am waiting if my issue returns.)


I haven't seen it happen in two weeks, so I can conclude that `suppress.focus.stealing=true` is probably a good workaround.


Cristiadu: "This problem is the most annoying thing on Intelij for me. I hate to be typing on the Terminal and my words appearing on a random class inside Intelij because they feel I want the app in my face right away."

I couldn't have described the problem better myself.


Hi Vojta , please try updating the IDE to the latest version from .

If the problem remains, please raise a new issue at , and provide diagnostic data for the investigation. (


Is there an IntelliJ setting "please never steal focus!"? (There should be: when I start IntelliJ, for example, and do something else while it's revving up I don't expect or want it to steal focus back when it feels it is ready.)


Tim T Hanson Actually, there is:

If it doesn't help in your case though, please report the problem to YouTrack as described in the comment above.


Arina Efremova I set this value in the registry in the past. Now PyCharm randomly started stealing focus again and I can no longer find this in the registry. Where has it moved? PyCharm is almost unusable for me without the option to disable focus stealing.


Hi Goldfish 

First, try updating the IDE to the latest version.

If that doesn't solve your problem, please submit a new bug report to our issue tracker describing what happens in more detail and providing additional diagnostic data for analysis.