Windows itself isn't guilty of this in my experience (lifetime of use until Linux switch last year), but other apps like shitty Akamai. Some years ago a coworker wrote this blog post and a simple tool to find out which programs are doing it: https://forwardscattering.org/post/30
Why does a window manager allow applications to steal focus?
Focus should change only in response to user commands.
Windows is absolutely guilty of this, and it is trivial to reproduce.
Reproduction steps:
- Start a reply to this comment in your browser, type some example words.
- Create a BAT file with the following contents:
This occurs commonly and continuously on Windows, it is damn obnoxious. The OS should never ever change focus, it should however flash the window/taskbar, that is acceptable, but not shift my typing into whatever arbitrary program opened. This used to be fixable via "ForegroundLockTimeout" which is what classic TweakUI altered, but was killed in Vista.If you're a Visual Studio user, it is a daily annoyance. You hit Start/Play, go about your work, and then suddenly some time later focus shifts out from under you.