bladeSk / StayFocused

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

Stay Focused

💾 Download

Stay Focused prevents the annoying "focus stealing" that's been plaguing Windows since Windows 2000. Focus stealing occurs when an app pops up unexpectedly, like when you're in the middle of writing a sentence in another window.

This utility prevents focus stealing by injecting a DLL into offending apps. The DLL "hooks" the process' system calls to SetForegroundWindow to an empty function.

Stay Focused Screenshot

Usage

Extract the app somewhere and run it, it will automatically hook whitelisted apps and watch for newly created ones. Closing the window minimizes the app to tray. To exit and unload it, click the unload button.

Configure which apps you want to hook by editing the .ini file, exit and re-run Stay Focused to apply changes. You may wanto to turn on the blacklist mode to hook everything excluding system apps.

When running in the blacklist mode, you shouldn't run this with administrator privileges, system processes are not very safe to hook.

Get the binary here https://github.com/bladeSk/StayFocused/releases

Building

The building process is a bit involved at the moment, this should be streamlined in the future.