"Z" windows position lock
If you switch applications while you launch an application it can lead to the frontmost window being not the active window. This is a problem I encounter quite often, it also happens when you launch an application and another one spawns a window. I'm unsure if you mean this, but it seems to be normal behavior. Looks like



In this case, the iTunes window is the frontmost window (recognizable by its buttons drawn colored), while iTerms window is drawn over the iTunes window. iTunes is also the active application as you can see on the menubar.