I use ubuntu 19.04, but i've been having this problem for a bit now, and i am not sure what is causing it.
I first started to really notice it in 18.10 (maybe 18.04), but when i have phpstorm open and open up a file in nautilus and if any window is overlapping phpstorm, i am unable to bring focus of phpstorm into the foreground from the background without first click on another open window (doesn't matter which, just any window that is open).
So if nautilus is over phpstorm when i open a file, i have to click again inside the editor to steal focus, so i can bring phpstorm back into focus.
I am not entirely sure if this is a linux specific issue, been awhile since i used windows for development. so if any one knows a fix for this, that would be brilliant.