8

The issue started after installing Windows 11 (It was fine in Windows 10).

Every 5-10 minutes, I lose focus on active window. It's annoying esp when I am on full-screen mode.

I started trying writing a random word and pressing Enter when that happens. I notice the Edge browser opens with that word as the keyword on bing search.

Note: My default browser is set to Chrome.

How do I find the culprit?

  • Possible dup: [How to identify which program has left a portion of its UI floating on my screen?](https://superuser.com/a/1544710) – DavidPostill Mar 30 '22 at 13:53
  • I don't think it's similar to it. There is 0 visible part in my case. I am guessing a search box but I don't see anything. –  Mar 30 '22 at 13:56
  • You can still use my answer to find out what is the owner of the invisible Window. – DavidPostill Mar 30 '22 at 14:00
  • You have disabled Focus Assist? https://www.theverge.com/22696232/focus-assist-windows-11-microsoft-how-to – Gantendo Apr 04 '22 at 02:40
  • @Gantendo I am not using it –  Apr 05 '22 at 20:33
  • I'm afraid this is a me too post. This is constantl(y - it just happened) happening when typing in my browser (Firefox). Every few minutes, the window loses focus for about 0.5 seconds - the banner flashes white, then back to blue - and my keystrokes disappear into the ether. Damned annoying. This only started happening a week or two ago - I presume due to a Windows upgrade, since I'm not in the habit of installing loads of software. I can confirm that Focus Assist has no effect, and that this occurs on any open window in focus. Windows 10 Pro Version 21H2 (OS Build 19044.1706) – SadSack963 Jun 27 '22 at 17:04

4 Answers4

4

Thank you @ClioCJS for the program.

I also found that mstsc is stealing focus.

As described here: my issue was also connected to WSLg.

In this article I found the way to stop wsl:

wsl --shutdown

I also created '.wslconfig' in the user profile folder file with the following content:

[wsl2]
guiApplications=false

Docker crashed, but I will figure it out later. Everything is ok for now.

Starina
  • 51
  • 3
  • As it’s currently written, your answer is unclear. Please [edit] to add additional details that will help others understand how this addresses the question asked. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Feb 06 '23 at 21:47
2

I have a focus-monitor.exe that outputs to the console the filename of each process that takes focus. It's very useful for this situation.

If you would like to try it, I posted it here: https://mega.nz/file/4Y8nnbSa#Pnw97sQz8bRM_bXjlrcYT_HGiaBd4kdY_6DNq0T7FWE

ClioCJS
  • 137
  • 1
  • 1
  • 14
0

Hard to tell. There are options like running another app to log focus changes and find the issue there.

I was lucky that I was also getting errors in JetBrains Rider app about ADB (Android Debug Bridge) crashing/restarting constantly.

I checked the event logs (EventViewer) and noticed the same: event log

The are all about ADB crashing and starting.

I head to a terminal and run adb server manually and seems like fine as long as that terminal is open (i.e I don't get focus loss any more).

Sorry if this does not explain much about your case but probably yet another case of focus stealing issues.

Bakhshi
  • 151
  • 1
  • 3
0

Thank you to @ClioCJS that little exe helped me find out that mstsc.exe was stealing my window focus allowing me to find this issue:

https://answers.microsoft.com/en-us/windows/forum/all/mstscexe-stealing-focus/f9acb6fd-3c95-4e22-8f40-dc41dffbb178

I tried the steps suggested by Jaspreet.Singh_050 by ultimately a reboot resolved the issue for me. In my case, I suppose Remote Desktop Manager would have caused this.

  • 1
    Your answer could be improved with additional supporting information. Please [edit] to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Feb 03 '23 at 09:08