bladeSk / StayFocused

Prevents focus stealing on Windows
https://blade.sk/stay-focused/
MIT License
75 stars 8 forks source link

[fix/feature request(?)] Some applications still stealing focus somehow (specifically when something is closing?) #7

Open pressRtowin opened 2 years ago

pressRtowin commented 2 years ago

This may fall outside the scope of this application, but while this tool successfully blocks every attempt by the League of Legends client to steal focus when queuing up for a game and during champ select (it tries to steel focus like half a dozen times and it's absolutely ridiculous and annoying if you like to do other things that require an active window during this time, such as typing something out), focus is still lost from what I'm doing (but I'm not exactly sure where that focus is going to) when the launcher client (LeagueClient.exe) closes at the end of champ select, but before the actual game client (League of Legends.exe) has launched. To be clear, it's not the launching of the game client that steals focus, as focus is lost from the window I'm working in before it actually opens, but rather right after the launcher client closes.

bladeSk commented 2 years ago

Not fixable without more information. Try using the blacklist mode to block all the apps and see if that helps. It should also print out any processes that got hooked with StayFocused, which may help tracking down what was causing this.

jonathanmc commented 2 years ago

I get this on a recent upgrade to Win11 with mstsc.exe (remote desktop). That's without me running rd. It's doing something in the background. Whitelist with mstsc.exe or blacklist both hook the processes, but still lose focus when mstsc.exe steals it. (No window for mstsc.exe, as I mentioned it's happening in background). Thank you for the program, however.