This post describes how to stop Windows applications from stealing focus from each other. In a practical sense, no piece of software should be able to “jump” to the top and activate your cursor in it, after the steps in this blog post have been applied.
After some recent batch of Windows updates my Outlook desktop client started stealing focus whenever there was a new email coming in. Like most people, I get a lot of email, and after a while my humor completely ran out with Outlook jumping in, stealing my keystrokes and doing whatever those keystrokes were bound to in Outlook.
Okay, it’s worth another post, whether broken updates should be pushed to end-users, but let’s not go there.
Some quick googling did not yield any good solutions for me. The best that was given to Outlook alone was to disable all add-ins, but that did not do the trick.
I did not find a suitable solution for just Outlook, but luckily that doesn’t stop us from disabling ALL APPS from stealing focus altogether! And to me, that’s not bad. No app should be jumping around frantically anyway.
Why and when does stealing focus happen?
At least in my case, it was fairly simple. Any time Outlook would show a notification for new mail, the window also stole focus. I already disabled practically all of the notifications from Windows 10 Notification Center, but that did not help. The darn window was still popping up constantly when I was doing something else.
This solution was outlined in this conversation. We’ll be setting the registry key for Foreround Lock Timeout to 0, effectively stopping that timeout from ever expiring. Down below the steps with a few screenshots:
- Open regedit (win+r, write regedit, or just search for regedit in Start menu).
- Export your registry to make a backup before making changes!
- Browse to HKEY_CURRENT_USER > Control Panel > Desktop..
- Edit ForegroundLockTimeout (see below) to be 0 instead of whatever there is.
And that’s it! You should be good.
Latest posts by Antti K. Koskela (see all)
- SharePoint Localization – a (somewhat) comprehensive how-to! - July 18, 2018
- How to enable custom scripts for a SharePoint site collection? - July 16, 2018
- Fixing issue “AADSTS70005” by enabling the implicit authentication flow for your Azure AD app - July 11, 2018
- How to show more than 30 categories in SharePoint blog/news sites? - July 9, 2018