Stealing focus in windows

How to Prevent Programs From Stealing Focus in Windows

It’s easy to stop programs from popping up in front of other ones

Ever been annoyed by a program that pops up in front of what you’re doing, without you selecting anything? In other words. without your permission?

It’s called stealing focus, and it’s a lot like being photobombed, right on your computer screen!

Sometimes focus stealing is due to malicious programming by the software developer that’s doing it. Most of the time, however, it’s just buggy software or operating system behavior that you’ll need to pin down and try to fix or avoid.

In early versions of Windows, most notably in Windows XP, there was actually a setting that either allowed or prevented programs from stealing focus. See More on Stealing Focus in Windows XP below the troubleshooting steps.

Focus stealing was certainly more of a problem in older versions of Windows like Windows XP but it can and does happen in Windows 10, Windows 8, Windows 7, and Windows Vista as well.

How to Prevent Programs From Stealing Focus in Windows

It’s not possible for Windows to block all programs from stealing focus and still work properly—it’s just not built with the brains to understand that.

Ideally, no other program but the one you’re working in would accept mouse and keyboard input, and the window would stay on top of all the other ones you’re not currently using.

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 Window Focus Logger 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:

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

You can remove programs in Windows from Control Panel with the Programs & Features applet, but free uninstaller tools work as well.

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.

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.

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.

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

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.

Read through our 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 lets 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. Drag the mouse pointer from Window On Top and drop it on a window to make it stay on top. Or, hit the Ctrl+F8 hotkey.

Windows should now stop stealing focus while you’re not using them.

More on Stealing Focus in Windows XP

As mentioned at the start of this piece, Windows XP actually allowed for focus stealing if one specific value in the Windows Registry was set in a specific way.

Читайте также:  Linux xfs или ext4

Following the short tutorial below, you can manually change that value to the one that prevents programs from stealing focus in Windows XP.

Changes to the Windows Registry are made in these steps. Take great care in making only the changes described below. It’s recommended that you back up the registry keys you’re modifying in these steps as an extra precaution.

Locate the HKEY_CURRENT_USER hive under My Computer and select the (+) sign next the folder name to expand the folder.

Continue to expand folders until you reach the HKEY_CURRENT_USER\Control Panel registry key.

Select the Desktop key under Control Panel.

On the right-hand side of the Registry Editor tool, locate and double-click the ForegroundLockTimeout DWORD.

In the Edit DWORD Value window that appears, set the Value data: field to 30d40.

Make sure the Base option is set to Hexadecimal when entering the DWORD value.

Those are zeros in that value, not ‘o’ letters. Hexadecimal doesn’t include the letter o and so they wouldn’t be accepted, but it should be mentioned nonetheless.

Select OK and then close Registry Editor.

Restart your computer so the changes you made can take effect.

From this point forward, programs you run in Windows XP should no longer steal the focus from the window that you’re currently working in.

If you’re not comfortable making manual changes to the Windows Registry yourself, a program from Microsoft called Tweak UI can do it for you. Once installed, head to Focus under the General area and check the box to Prevent applications from stealing focus.

Honestly, though, if you’re careful, the registry-based process explained above is perfectly safe and effective. You can always use the backup you made to restore the registry if things don’t work out.

something keeps stealing focus in windows 7

I was reading this thread and decided to just post my own, and now I’m posting here because nobody has an answer apparently. I’ve had the same issue for years, and now that I finally know the term — focus stealing — I can articulate it to somebody.

This has been going on for several years with my Windows 7 comp, and it’s gone from annoying to almost infuriating. I’ll be playing a game, or working on a document, or watching a video, or reading something online, or whatever, when Windows clicks and the active window loses focus for about a second, then gives it back. If I’m watching a video with VLC fullscreen, the taskbar comes to the front when it happens, and I have to click the video to go back to fullscreen. If I’m playing a game, it screws the controls up and gets me killed (or minimizes the game and goes back to the desktop, and I have to click the taskbar icon to get back in, where again my controls are often screwed up). If I’m writing online or in a word processor, it interrupts my writing mid-sentence, and I have to wait (or worse, click again) for focus to return to the document so I can finish what I was trying to say, which totally disrupts my concentration. This would happen every other day and so rarely and randomly that it was impossible to test for.

For the past few days it has been occurring more frequently, mainly when I’m writing or watching videos, but I’m not sure the applications I’m trying to use really make a difference. It’s still impossible to test for because I don’t know what’s causing it.

Other threads, including the one I linked, suggested processes and services that are stealing focus, or that it’s a keyboard problem. I have never seen any of those processes, and I’ve used multiple keyboards with this same machine with no difference in the focus stealing frequency. I first noticed it after installing Battlefield Heroes and Punkbuster, but both of those have been uninstalled from my hard drive for some time, and still the issue persists.

There are no visible applications stealing focus when this occurs: nothing I can identify in task manager or taskbar. I can’t check the task manager when it happens because it’s impossible to determine when it will occur, so I would have to sit and stare at the thing for days while waiting for something suspicious to pop up. All the virus scans in the world haven’t found the problem, and I’ve already used Avast and AVG and a few other things I can’t recall.

This appears to be a widespread problem with no real consistent solution, if it has a solution at all. At my wit’s end and would like suggestions please. I’m not going to sit and watch my task manager for god knows how many days trying to spot whatever is causing the problem. I’m going to take a stab at what this thread says, but I have my doubts that it will make a difference, and would appreciate further suggestions. Thanks in advance.

Читайте также:  Windows kernel modification detected please repair or reinstall your system что делать

Stop programs from stealing focus in Windows 7 [duplicate]

In Windows 7, if I launch a program and immediately make its window inactive (e.g. by minimizing or switching windows), it will pop back up after the program has finished loading completely.

This is undesirable. I would like to let a program load in the background without having it steal focus once it is ready. For example, this happens when I launch Photoshop.

Is there a way to disable this behavior?

1 Answer 1

Judging by at least the research I’ve done, it seems there used to be a registry key in XP that could be modified to accomplish this, but since Windows 7, that registry change has been ineffective (there is a very heated and relevant conversation on the Microsoft forums about this.)

I even found an interesting blog article our very own Jeff Atwood wrote about this in 2007, though his example was in XP.

The Microsoft moderators on the forums seem to suggest that by default in Windows 7, properly written applications shouldn’t steal focus (they argue that the registry tweak from XP was built in), but at the end of the day, the community believes they are simply wrong and some applications just do.

Discussions here on Superuser related to XP have ended up, as time has passed, having questions in comments being raised to how solutions could be appled to Windows 7. HarryMC posted a great answer that sheds some light there.

At the end of the day, it would appear that there is simply no way to accomplish this universally across Windows 7, as it seems to do more with the applications themselves. After a little testing, I discovered that some of my applications do call for focus and get it, while some do not.

Alternative Solution

One alternative that I use every day is Always On Top (alternative link). It binds the Ctrl + Space hotkey to make whatever window is in focus always on top.

I use it when working in almost any program that I know I don’t want interupted, as it will not allow any window over it. However, this may be more annoying to some people. I just make it a habit to hit the hotkey after I’m done with a particular program, or minimize it.

Alternative to the Alternative (My Opinion)

A shell replacement such as those HarryMC suggested in his answer from above are a viable solution.

Though in my mind, if you’re willing to completely replace Aero, or completely replace Explorer, or willing to completely replace the Windows shell to get this functionality (and I don’t blame you), you could just as easily replace Windows.

That’s what I did the beginning of this year. Learning ubuntu has been interesting, but it was for the better.

Applications stealing focus — reg key no longer fixes

I want to prevent any applications from stealing focus in windows 7 (and Vista). Tweakui used to modify the below Registry key to 0. Then there was a key that affected the number of flashes a «want to steal focus» window would make in the taskbar.

ForegroundLockTimeout
HKEY_CURRENT_USER\Control Panel\Desktop

This reg key is apparently no longer working. Focus stealing is a major problem, from canceling/oking window that pop-up, to getting virus’s from IE windows. Applications are still written to do this, including MS Office 2007. If you are typing an email something can pop up and get the next key stroke. I need to fix this. Any ideas, or has Windows completely removed a needed feature.

tags: steal focus apps active regedit

If you have further information or solutions for the community, I would encourage you to start a new thread at the following location:

Was this reply helpful?

Sorry this didn’t help.

Great! Thanks for your feedback.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this reply?

Thanks for your feedback.

I solved the problem in this way:

I noticed that just before the focus was «stolen», the PC got «busy» for a second (beside the mouse appeared the small circle indicating the processor is working hard on sth).

So I started the Task Manager and gave a close look at the processes. I noticed that one process took over a relevat percentage of CPU usage exactly an instant before the focus was stolen from the task manager window.

Since it was a process that I don’t need to be active all the time (sth about Vodafone Mobile connection, which I rarely use) I just stopped the process and then didn’t allow the process to be started every time I turn on the PC. I did this last step using Piriform’s free software «CCleaner», but I’m sure you can find different tools for this.

Читайте также:  Посмотреть пароль vpn соединения windows 10

This was enough to fix it .

Hope this helped!
Bye!

1 person found this reply helpful

Was this reply helpful?

Sorry this didn’t help.

Great! Thanks for your feedback.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

Prevent applications from stealing focus in Windows 10.

Applications stealing focus on Windows 10 is a very annoying issue. It often happens to me that I am typing very fast on Microsoft Word while looking at my keyboard and some application pops up on my screen and steals focus. Without noticing it I continue typing and realize later that everything has gone waste. Applications stealing focus can be really annoying at times, and it can also be difficult sometimes to identify the application doing so. In this post, we’ve tried to cover how to prevent applications from stealing focus on Windows 10.

Prevent applications from stealing focus

To prevent applications from stealing focus you can use WindowFocusLogger to detect such applications or you can use a tool like AlwaysOnTop to pin a window on top of others.

WindowFocusLogger

WindowFocusLogger is a freeware that can help you detect the applications that are stealing focus from the active window. The program does nothing to stop them from stealing focus but can only detect such applications. The utility does the identifying job, after that you can decide what should be done with the culprits. Ideally, you can uninstall them and look for alternatives or notify the developer about this issue.

Or you can look for any setting within the program that can prevent it from stealing focus. WindowFocusLogger is a great tool to detect any such application. It can be executed from CMD or you can use the GUI available. This review is for the GUI version.

The tool is quite simple to use, just open it and enter the duration for which you want to run this tool and hit the Start button.

The tool will start recording the actions and will log all the applications that took the Window Focus. The log will clearly display the process name, timestamp, and other details such as keyboard focus and user interface. From this log, you can easily identify which application that stole the focus without your permission.

The tool can run entirely from System Tray and requires the minimum number of interactions. Again, the tool does nothing to stop these applications from stealing focus but only identifies them. Read on to find out how to prevent it from happening.

Click here to download WindowFocusLogger.

AlwaysOnTop

If you are stuck with some application that you cannot find an alternative to. Or you simply cannot uninstall it due to several reasons then you should follow this. The only method by which you can prevent other application from stealing focus is by making your desired application steal focus from others. There are many freeware tools that let you select a window that would always stay on top of other windows. One such tool is AlwaysOnTop.

AlwaysOnTop is a free simple portable utility that lets you keep a window on top of others. The tool is very simple to use. Just run the executable and you are done. Now select any window and hit ‘Ctrl + Space’ from your keyboard. This window will now always stay on top of other windows. You can press the same keys to disable this feature.

AlwaysOnTop is quite simple and easy to use. It is compatible with any window or program. Also, it runs entirely from the system tray and you can also pause its execution from system tray icon itself. Using this tool, you can set the desired window on top and other windows won’t be able to steal focus at all. There are several other similar tools available that can make a window stay Always on Top.

So this was all about preventing applications from stealing focus on Windows computers. In this post, we actually discussed two methods. The first one being identifying the culprit applications and handling them manually. The second one is using third party tools to fix an application on top of all other windows.

Date: April 26, 2018 Tags: Freeware

Neat Download Manager for Windows 10 will speed up your downloads

Best Free Ping Monitor Tools for Windows 10

Best Free 8085 Microprocessor Simulators for Windows 10

[email protected]

Lavish loves to follow up on the latest happenings in technology. He loves to try out new Windows-based software and gadgets and is currently learning JAVA. He loves to develop new software for Windows. Creating a System Restore Point first before installing a new software is always recommended, he feels.

Оцените статью