3 ms·
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 coworke
by pixelpoet 9mo ago
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 https://forwardscattering.org/post/30
- Someone1234 9mo agoWindows 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: @echo off timeout /t 15 /nobreak >nul start notepad.exe - Run the BAT file. - Immediately switch back to the browser tab, and place your focus into the HN reply box. Type a word. - Wait for notepad to open - Continue typing. Your typing will go into Notepad and not the browser tab you had focused last. 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.
- paulmooreparks 9mo agoI'm running Windows (25H2, 26200.7462). I used the batch file you pasted and tried your repro steps, multiple times (I started writing this comment, in fact). It didn't steal focus. (Edit: See below). I'm quite sure that I haven't had a steal-focus issue at the OS level for many years, and I use Windows all day, every day. I'm also a Visual Studio user. Edit: I tried it with Firefox and got a repro there. No stealing with Edge.
- nottorp 9mo agoWhy does a window manager allow applications to steal focus? Focus should change only in response to user commands.