I'm using KDE 5 with multiple desktops (in a 3x4 grid) and I regularly open Vim from the command line, e.g. with
gvim file.txt
The problem is when I do this, GVim often appears on a different desktop than the one I am currently focused on. I then have to go and find it, and bring it on to the desktop I am working on. This is inconvenient!
Some other curious details are:
As well as opening on the wrong desktop, GVim is always at the back of the window list, so it's hidden behind other windows.
(That actually helps me to find it. I have a keybind to cycle windows on all desktops, and since GVim at the far end of the window list, I can find it quickly by cycling backwards.)
I have not understood the pattern of which desktop GVim chooses to open on, however it seems to choose a recently used workspace, rather than one of the empty ones I rarely use. On rare occasions, it does actually choose the desktop I am on!
Of all the applications I use, GVim is the only one with this behaviour. How can I stop it?