There is no cure-all solution, since there is no way that Windows can totally block
applications from stealing the focus and itself remain functional.
For example, if during a file-copy your anti-virus detected a possible threat and
would like to pop-up a window asking you for the action to take,
if this window is blocked then you would never understand why the copy suddenly froze.
If the problem is with some unknown focus stealer, a good tool for detecting
the stealer is with the free
Window Focus Logger
(use the GUI version WindowFocusLoggerGUI.exe).
Once the focus thief is identified, there are several solutions:
- Prevent it from running in the first place
- Update it to a newer version that is better behaved
- Enable focus-follows-mouse so the focus stays in your application
(unless the focus stealer jumps in front of the cursor).
This is done in
Control Panel > Ease of Access Center > Make the mouse easier to use, check
"Activate a window by hovering over it with the mouse" and click OK.
- Minimize it using a stronger method than minimize to the taskbar.
The last method is by minimizing the offending window to the System Tray,
also known as the Notification Area, where only the
software that minimized it can undo it.
An example for such a product is
4t Tray Minimizer Free.