Having used Linux-based OSs for several years I grew to love the virtual desktops. I was happy to find out that W10 had implemented virtual desktops too. However using them i have found that occasionally the virtual desktops will switch focus automatically.

As far as i can tell there is no real pattern, sometimes it switches after sitting idle for a couple of minutes (but not always), sometimes it switches while i am actively using the virtual desktop (but not always and sometimes it switches back instantly). Also strangely it doesn't focus automatically on the same virtual desktop either, sometimes it is desktop 1 or 2 depending on how many are open (at most 4).

Obviously this is slightly annoying and I have no idea if this is a common problem (google didnt give me any useful results) so am I the only one 'suffering' from it? Regardless, is there a fix?

  • Can it have something to do with a program in another virtual desktop getting the focus? – harrymc Jan 26 '16 at 20:23
  • I see I got it right. – harrymc Jan 27 '16 at 6:42
  • The patterns I see are: clicking on a web link in Outlook opens it in the Firefox instance used last, even if it is in another virtual desktop and current VD already has another instance of Firefox running. Similarly, opening a Word file in Outlook switches to the VD which ran Word last. This is absolutely insane and counter-productive behavior. =( – alexandroid Apr 30 '19 at 0:14
  • I have to say that over the years, I have noticed less and less annoying automatic switching in W10. Either it has been improved or i have gotten used to it. – nluigi Apr 30 '19 at 10:16

After a little experimentation, I believe I have found the answer.

The issue seems to be when Windows focuses on a program. For example, if you click outside of your web browser, you'll notice it grays out. Windows is no longer focused on it, it's focused on the window you clicked.

If you try running a program that's already open in another virtual desktop (depending on its ability to have multiple windows open), it will redirect to the applicable desktop.

Now, in the article below, it talks about "focus stealing". This is where a program steals the window focus for itself. This can and will affect your virtual desktops, so here are some instructions from it on how to prevent this:

How To Prevent Programs From Stealing Focus in Windows

It's not possible for Windows block all programs from stealing focus and still work properly. The goal here is to identify the program that shouldn't be doing this and then figure out what to do about it.

You may know what program keeps stealing focus, but if not, that's the first thing you need to determine. If you're having trouble figuring it out, a free tool called Windows Focus Logger (link in article) can help.

Once you know what program is to blame for the focus stealing, work through the troubleshooting below to make it stop happening for good:

  1. Uninstall the offending program. Frankly, the easiest way to solve a problem with a program that's stealing focus is to remove it.

Note: If the focus stealing program is a background process, you can disable the process in Services, located in Administrative Tools in all versions of Windows. Free programs like CCleaner also provide easy ways to disable programs that start automatically with Windows.

  1. Reinstall the software program that's to blame. Assuming you need the program that's stealing focus, and it isn't doing so maliciously, simply reinstalling it may fix the problem.

Tip: If there's a newer version of the program available, download that version to reinstall. Software developers regularly issue patches for their programs, one of which may have been to stop the program from stealing focus.

  1. Check the program's options for settings that may be causing the focus stealing and disable it. A software maker may see a full screen switch to his or her program as an "alert" feature you want, but you see it as an unwelcome interruption.

  2. Contact the software maker and let them know that their program is stealing focus. Give as much information as you can about the situation(s) where this occurs and ask if they have a fix.

Tip: Please read through my How to Talk to Tech Support for help properly communicating the problem. Last, but not least, you can always try a third-party, anti-focus-stealing tool, of which there are a few:

DeskPins is completely free and let's you "pin" any window, keeping it on top of all others, no matter what. Pinned windows are marked with a red pin and can be "auto-pinned" based on the window's title.

"Window On Top" is another free program that works in much the same way. (Link in article)


Hope this helps!

  • Under Windows 9x, there is a registry setting to prevent programs from stealing focus, accessible using Tweak UI. Does this registry setting still exist/work on Windows 10? Any idea where in the registry it is? – Stewart Mar 1 '19 at 12:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.