i think i’ve been struggling with a similar problem, in that whenever you click into an inactive blender window, unexpected things will happen. like you said sometimes it takes several clicks to make it active, but more infuratingly, sometimes it will send randomly change interface elements (ie, i click the window frame to make it active, and one of the property sliders completely changes its value).
i thought i was going insane at first, with weird values cropping up all over the place. then i realized what was happening, and figured i must be doing something wrong, but in the end i discovered it seems to be an issue with blender window redrawing (preferences>system>window draw method). there are several options, and i believe it defaults to ‘automatic’ but that definitely wasn’t the best setting in my case. unfortunately, it seems the only one that alleviates the problem is ‘full’ method, which is supposedly the slowest and least efficient.
i’m curious, are you on a mac? part of me wonders if its osx’s graphics drivers/open gl implementation, as if this was happening to the much larger windows user base, there would be more discussion about this!