Comment by neutronicus

1 month ago

This is a constant irritation for me on Windows.

I work on a desktop Windows/Mac application that takes forever and a day to launch (CAD package), and pops up a million pop-ups during the process. I try to get minor admin tasks done while it is compiling/launching, but it steals focus every 10 seconds!

Still beats using XCode, though

Windows 11 also broke the active window from focusing when waking from sleep. Whenever I wake my PC, no window is active. I'll still have a fullscreen Chrome or whatever, but if I try to do Ctrl+T to open a tab nothing happens because nothing is in focus. I have to Alt+Tab once to bring it into focus.

Change the ForegroundLockTimeout registry setting to increase the timeout, or you can set it to the max integer value to never let the app steal the focus.

by default if you haven't typed anything for a little bit Windows allows an application to steal focus. If you change that value you can prevent windows from ever stealing focus or change how long they have to wait before they're allowed to.