Title

Message

Confirm

<< DiscussionsReply

Window focus unexpectedly changing to another app while typing...

Avatar from Gravatar.com
Uriah
21 discussion posts
This started a few weeks ago. I haven't found any way to reliably duplicate or predict the problem, but it's happening very frequently, and only when using Display Fusion.

Basically, I have a dual monitor setup, stacked vertically. A 38" curved ultrawide in 3840x1600 and a 32" widescreen in 2560x1440. The window focus keeps randomly changing to VSCode while I'm typing. I'll be right in the middle of typing a sentence and will look up and see I'm now typing in VSCode instead of the web browser, email client, Slack, etc. It's actually happened TWICE while I've been typing this message (that's how frequent it is). I'm at a total loss as to what's causing it, but it goes away completely when DisplayFusion is not running.
• Attachment [protected]: DisplayFusionDebugInfo.zip [24,451 bytes]
Oct 31, 2019  • #1
Keith Lammers (BFS)'s profile on WallpaperFusion.com
Could you send me a full debug log for this?

  • On the DisplayFusion Settings > Troubleshooting tab, change the Logging drop-down to "L1: Log Minimal" and click Apply
  • The next time this occurs, note the time so we'll know where to check in the log file
  • Click the "Export Info to File" button on the Settings > Troubleshooting tab
  • Reply with the file attached
  • Disable debug logging after sending the log
Nov 1, 2019  • #2
Avatar from Gravatar.com
HL
1 discussion post
I figured out how to solve that issue so might as well post here to help dev narrow it down.

This problem started after the Windows 10 patch KB4522741 is installed. It is a .Net Framework patch for 3.5 and 4.8.

It is caused by the Multi-monitor Taskbars function. If you disable the feature it will stop happening.

That is the best workaround I have so far.
Nov 2, 2019  • #3
Avatar from Gravatar.com
Uriah
21 discussion posts
10:35:24 (ish) +/- a few seconds.
• Attachment [protected]: DisplayFusionDebugInfo.zip [58,500 bytes]
Nov 4, 2019  • #4
Keith Lammers (BFS)'s profile on WallpaperFusion.com
Thanks! I can see in the log where that focus change happened, but there aren't any lines in the log to indicate that DisplayFusion caused it to switch focus (nothing regarding the taskbar or anything like that). I'm just seeing lines for things that happen after the focus changes.

If you disable the DisplayFusion taskbars, does that make any difference?
Nov 4, 2019  • #5
Avatar from Gravatar.com
Uriah
21 discussion posts
Hi Keith, I did some testing and if I disable Display Fusion's taskbar functionality and use the built in "Show taskbars on all displays" feature in Windows 10, the unexpected window focus changes go away. So it appears to be something with Display Fusion's multi-monitor taskbars. It's a pity because I like the way you do it over the way Windows 10 natively does it. But I'll have to settle for less for now.
Nov 6, 2019  • #6
Avatar from Gravatar.com
srslyUnique
7 discussion posts
Can confirm that this happens with the taskbar replacement.
Has been happening for around a week now.

Disabling the taskbar replacment fixes the problem.

The issue only occurs if my focus is on the 2nd screen - it never switches from the main screen to the 2nd screen.

If no window is open on the main screen it can even happen, that a background window is brought to the foreground on the 2nd screen.
Nov 6, 2019  • #7
Avatar from Gravatar.com
Uriah
21 discussion posts
Quote:
The issue only occurs if my focus is on the 2nd screen - it never switches from the main screen to the 2nd screen.

If no window is open on the main screen it can even happen, that a background window is brought to the foreground on the 2nd screen.


I totally forgot to include that detail in my original post! For me it's the exact opposite. My primary monitor (the top one - monitor #1) always loses focus, while my secondary monitor (the bottom one - monitor #2) is the monitor the focus is always switching to unexpectedly. BUT it's worth noting that I do have my "primary taskbar" moved to monitor #2 (my bottom monitor), so that may be why my "focus issue" is the exact opposite of yours...
Nov 7, 2019  • #8
Keith Lammers (BFS)'s profile on WallpaperFusion.com
Ok, thanks for the update, this is a stumper! Does it seem related to any specific apps that are open on either screen at the time? I'm not seeing anything like that happening here, but there must be something common between your two systems, I just need to figure out what it is!
Nov 7, 2019  • #9
Avatar from Gravatar.com
Uriah
21 discussion posts
I'll turn the DisplayFusion taskbar back on and will re-enabling logging tomorrow when I start work, so I can hopefully have some better log results over to you. Maybe that will help you get to the bottom of it.
Nov 7, 2019  • #10
Avatar from Gravatar.com
Uriah
21 discussion posts
Please assume +/- 5 seconds to each timestamp

10:52:24 - Typing in Slack on monitor #1, unexpectedly focused to Visual Studio Code on monitor #2.

12:14:34 - Typing in LibreOffice Writer on monitor #1, unexpectedly focused to Visual Studio Code on monitor #2.

12:17:01 - Typing in LibreOffice Writer on monitor #1, unexpectedly focused to Visual Studio Code on monitor #2.

12:21:50 - Typing in LibreOffice Writer on monitor #1, unexpectedly focused to Notepad++ on monitor #2.

12:24:14 - Typing in LibreOffice Writer on monitor #1, unexpectedly focused to Notepad++ on monitor #2.
• Attachment [protected]: DebugInfo.zip [315,253 bytes]
Nov 7, 2019  • #11
Avatar from Gravatar.com
srslyUnique
7 discussion posts
I can confirm the behaviour (only from #2 to #1 in my case), happened with the following apps:
Chromium, Opera, Sublime Text, Windows Explorer.

Also happened with: Chromium and Sublime both on screen #2, focus switched from Chromium to Sublime, so it actually brought Sublime in front of Chromium.

It never happened if the programs are minimized - only if they're in the background.
Nov 7, 2019  • #12
Keith Lammers (BFS)'s profile on WallpaperFusion.com
@srslyUnique: Could you attach a debug log as well?

  • On the DisplayFusion Settings > Troubleshooting tab, change the Logging drop-down to "L1: Log Minimal" and click Apply
  • Reproduce the issue and note the time so we'll know where to check in the log file
  • Click the "Export Info to File" button on the Settings > Troubleshooting tab
  • Reply with the file attached
  • Disable debug logging after sending the log
Nov 8, 2019  • #13
Avatar from Gravatar.com
srslyUnique
7 discussion posts
Attached.
Around 19:16:10 it switched from the opened Windows clock and brought the DisplayFusion settings window to the foreground, without any action on my side.
• Attachment [protected]: DisplayFusionDebugInfo.zip [39,668 bytes]
Nov 8, 2019  • #14
Keith Lammers (BFS)'s profile on WallpaperFusion.com
If you guys open a PowerShell prompt and enter
Get-Hotfix
, is KB4722741 listed there?
Nov 8, 2019  • #15
Avatar from Gravatar.com
srslyUnique
7 discussion posts
Can't find anything about the ID you listed, not even in Google?

Output is:

Code

Nov 8, 2019  • #16
Avatar from Gravatar.com
srslyUnique
7 discussion posts
Funny thing, after downloading and installing another update (KB4522355), KB4522741 appeared and is installing now.

/edit:
KB4522741 is listed in the update history - but not under Get-Hotfix.

/edit2:
Focus switch is still happening, so not the culprit/solution.
Nov 8, 2019 (modified Nov 8, 2019)  • #17
Avatar from Gravatar.com
Faviel
3 discussion posts
Hi, I have the same issue, so I'll post my findings as well (maybe it will help someone here).
1st I thought that this is a Firefox issue as most of the time focus was switching from one Firefox window on one monitor to another Firefox window on another monitor. But when it started to do it also with other applications then it looked more like a Windows 10 or DisplayFusion Pro issue.
After reading some comments here I started playing with some settings of DisplayFusion Pro and I've changed setting in the 'Taskbar' tab called 'Taskbar Mode' from “All taskbars show relevant windows” to “Windows taskbar shows all windows, DisplayFusion shows relevant windows” and it seems to prevent from windows focus switching (no matter on which monitor I have a window with a focus on it).
Nov 11, 2019  • #18
Keith Lammers (BFS)'s profile on WallpaperFusion.com
@Faviel: Could you attach a copy of your DisplayFusion troubleshooting info as well?

  • Open the Settings > Troubleshooting tab
  • Click the "Export Info to File" button
  • Reply with the file attached
Nov 13, 2019  • #19
Avatar from Gravatar.com
Faviel
3 discussion posts
Sure, here is the file.
• Attachment [protected]: DisplayFusionDebugInfo.zip [24,372 bytes]
Nov 13, 2019  • #20
Keith Lammers (BFS)'s profile on WallpaperFusion.com
Thanks! The only thing I can see in common between your 3 machines is that you all have the Xbox Game Bar running. I've enabled that on my machine now so we'll see what happens
Nov 13, 2019  • #21
Avatar from Gravatar.com
srslyUnique
7 discussion posts
I'm not 100% sure, but with the latest Win10 update, it doesn't seem to happen anymore.
I've reactivated the taskbar and settings and could work the last 2 hours without noticing another focus switch...

I'm with a customer tomorrow, so can't really check, but will update on friday if it occurs again.
Nov 13, 2019 (modified Nov 13, 2019)  • #22
Avatar from Gravatar.com
Jef Waite
13 discussion posts
I too experience the issue. I do not have the Xbox Game bar running, BUT I do have the Xbox for PC beta installed. I just tried exiting the XBox for PC Beta to see if it continues to occur.

I have attached the Debug Info you were requesting from other users to hopefully determine if it's DisplayFusion or some Windows issue.

Thanks!
• Attachment [protected]: DisplayFusionDebugInfo.zip [26,901 bytes]
Nov 14, 2019  • #23
Avatar from Gravatar.com
srslyUnique
7 discussion posts
Happened again, so it wasn't fixed with the last Windows Update.

If I quit Xbox for PC manually, the issue did not occur during the last 15mins.
Nov 14, 2019 (modified Nov 14, 2019)  • #24
Avatar from Gravatar.com
Jef Waite
13 discussion posts
Just an update. Once I killed the XBox for PC Beta I have had no issues with weird focus problems.

I'll just make sure to keep that closed when I'm not actually using it.
Nov 15, 2019  • #25
Keith Lammers (BFS)'s profile on WallpaperFusion.com
Thanks for the update guys, that's super helpful! We will do some more testing with the Xbox beta app here and see if we can get this sorted out.
Nov 15, 2019  • #26
Avatar from Gravatar.com
Uriah
21 discussion posts
I have Xbox PC game pass beta as well, so maybe that is the case. I'll let you know!
Nov 16, 2019  • #27
Avatar from Gravatar.com
Uriah
21 discussion posts
Hi Keith, I've re-enabled the DisplayFusion taskbar (instead of the Windows 10 one) and can confirm that the issue goes away completely if I do NOT have the Xbox Beta app running in the system tray. The moment I launch the Xbox Beta app and minimize it to the system tray, the issue resumes exactly as before. Below is a link to the exact app in case you aren't familiar with it (I think it requires you to be a Windows Insider to install since it's still in Beta).

https://www.microsoft.com/store/productId/9MV0B5HZVK9Z

The Xbox Beta app is built on Electron, but Electron is definetely NOT the culprit since both Slack and VSCode are built with Electron and neither of those apps are causing such issues. It's only Microsoft's Xbox Beta app. So it's definetely something bizarrely specific to that specific app... As an aside it's a beautiful looking app but all that beauty can't make up for the fact that it's a clusterphuck of usability issues at the moment; so it's not surprising to me that it's causing problems. Based on this information, I think it's fair to point out that this focus issue does NOT appear to be the fault of Display Fusion (at least directly), but hopefully you can find a hack around it. Cheers!
Nov 18, 2019 (modified Nov 18, 2019)  • #28
Keith Lammers (BFS)'s profile on WallpaperFusion.com
Thanks for confirming! Does this happen when minimizing it to the taskbar (so there's still a taskbar button), or clicking the close button on the window so that it's only in the system tray?
Nov 19, 2019  • #29
Avatar from Gravatar.com
Uriah
21 discussion posts
Quote:
Thanks for confirming! Does this happen when minimizing it to the taskbar (so there's still a taskbar button), or clicking the close button on the window so that it's only in the system tray?


It happens whenever the Xbox Beta icon exists in the system tray - regardless of whether or not the Xbox Beta app is opened or minimized in a window that shows in the task bar. If the icon is visible in the system tray (even if it's not a tab in the taskbar), the focus issue will be present. The moment I right click on the icon in the system tray and "exit" the app (formally closing the entire Xbox Beta background process), the problem goes away. So the background process itself is apparently causing the issue.
Nov 19, 2019 (modified Nov 19, 2019)  • #30
Keith Lammers (BFS)'s profile on WallpaperFusion.com
Interesting, thanks! I'll do some more testing here. I haven't been able to reproduce it yet with the Xbox beta app running in the tray here, but I'll keep an eye on it
Nov 20, 2019  • #31
Avatar from Gravatar.com
Uriah
21 discussion posts
Cool beans. Ultimately there's two ways I can avoid the issue right now - either close the Xbox beta app and remove it from system tray or disable the DF taskbar. I'm a server-side programmer so know how frustrating it can be when you can't duplicate a problem; so no worries - it's not the end of the world..
Nov 21, 2019 (modified Nov 21, 2019)  • #32
Keith Lammers (BFS)'s profile on WallpaperFusion.com
If you move the tray icon into the hidden area, does that make any difference?
Nov 21, 2019  • #33
Avatar from Gravatar.com
Faviel
3 discussion posts
In my case I have 'Xbox (beta)' application only in the tray and still focus is switching between different windows.
Nov 24, 2019  • #34
Keith Lammers (BFS)'s profile on WallpaperFusion.com
Ok, I'll keep it running here, and if I can get it to happen locally we'll hook it up to the debugger and see what's going on
Nov 25, 2019  • #35
Avatar from Gravatar.com
ShiftyRat
1 discussion post
I am beyond thankful that I found this thread. I have been encountering this issue for weeks now and couldn't determine the culprit until I found this thread. I've disabled the multi-screen taskbar in DisplayFusion for now.
Jan 13, 2020  • #36
Avatar from Gravatar.com
JRS.42
1 discussion post
I have the same scenario here and was pulling my hair out trying to figure out what was causing it! Slack was the problem for me; I'd be typing messages and focus would shift to a browser and start making changes without me noticing (touch typist). I too run PC XBox Beta and had Multi-monitor taskbar set up which I've since disabled and will continue to leave disabled until this is fixed.

This happened for me in Slack during the day ALL THE TIME. Every 5/10 minutes typing or not.
Jan 15, 2020 (modified Jan 15, 2020)  • #37
Avatar from Gravatar.com
mojotaker
5 discussion posts
This has been one of the must hair pulling, most frustrating issue ever. Yeah xbox beta app is the culprit. Once I disabled that, sanity was restored back to my desktop.
Feb 3, 2020  • #38
Keith Lammers (BFS)'s profile on WallpaperFusion.com
@JRS: I run Slack here all day and still can't get this to happen. Are you using the Microsoft Store version of Slack, or the downloaded Win32 version from the Slack website?
Feb 7, 2020  • #39
Avatar from Gravatar.com
mojotaker
5 discussion posts
Quote:
@JRS: I run Slack here all day and still can't get this to happen. Are you using the Microsoft Store version of Slack, or the downloaded Win32 version from the Slack website?


Slack is not the problem. I run it all day too. The problem is the xbox beta app, thats doing this shenanigans.

Install that, and im sure you will be able to recreate this.
Feb 7, 2020  • #40
Keith Lammers (BFS)'s profile on WallpaperFusion.com
I've had the Xbox Beta app installed and running for weeks and haven't run into this issue at all, so I'm trying to figure out if there's a third factor contributing here

The only other thing I can see that may be common, is that when the focus is lost, it's switching from an Electron framework app (Discord, Slack) to something else, but as I mentioned, I run Slack all day as well and haven't had this happen yet, so I'm pretty stumped.
Feb 7, 2020 (modified Feb 7, 2020)  • #41
Avatar from Gravatar.com
mojotaker
5 discussion posts
Funnily, I have all apps you listed. The issue only happens with xbox beta running.
Here is my setup
I have 2 monitors
and nvidia rtx 2070
windows 10 pro
ryzen 3700x
32gb ram

Silly questions, are you using more than 1 monitor
and also are you using displayfusion muliti monitor wallpaper loading images from disk ?
Feb 7, 2020  • #42
Keith Lammers (BFS)'s profile on WallpaperFusion.com
I do have multiple monitors, and random wallpapers, using online sources, but other customers reporting this issue don't have random wallpapers enabled at all, so I don't think that's related here
Feb 10, 2020  • #43
Avatar from Gravatar.com
JordanMillward_1
2 discussion posts
I've been having the same issue - after 30 or so seconds, the focus would shift from the current active window to the last window I'd had active, and I'd have to reselect the original window. It happens without me doing anything, but is especially noticable when typing.

As with the others, I'd also had the Xbox for PC beta running in the system tray, and now I've turned it off, the issue has stopped, but as soon as I open that program again, the issue returns.
• Attachment [protected]: DisplayFusionDebugInfo.zip [29,715 bytes]
Feb 11, 2020  • #44
Avatar from Gravatar.com
Micko
2 discussion posts
Deleted: My issue is not caused by DisplayFusion.
• Attachment: DisplayFusion.mp4 [4,031,862 bytes]
Feb 26, 2020 (modified Feb 26, 2020)  • #45
Avatar from Gravatar.com
Nathan Dick
2 discussion posts
I'm getting a constant error that seem to happen when I get the re-focus issue:

Event ID 10016
The machine-default permission settings do not grant Local Activation permission for the COM Server application with CLSID
{C2F03A33-21F5-47FA-B4BB-156362A2F239}
and APPID
{316CDED5-E4AE-4B15-9113-7055D84DCC97}
to the user MyPC\Admin SID (S-1-5-21-1540865069-212541850-3187210981-1001) from address LocalHost (Using LRPC) running in the application container Microsoft.Windows.ShellExperienceHost_10.0.18362.449_neutral_neutral_cw5n1h2txyewy SID (S-1-15-2-155514346-2573954481-755741238-1654018636-1233331829-3075935687-286147870. This security permission can be modified using the Component Services administrative tool.

Unsure if this means anything.
Feb 29, 2020 (modified Feb 29, 2020)  • #46
Keith Lammers (BFS)'s profile on WallpaperFusion.com
@Nathan: If you exit the Xbox Beta app, do thos COM errors stop showing up?
Mar 3, 2020  • #47
Avatar from Gravatar.com
mojotaker
5 discussion posts
So guys here is an Update.
I put my windows on the slowring see attached.
I got the xbox beta app running, and no issues.
I have had it running for several weeks/days now, and no issues anymore.
• Attachment: slowring.png [7,034 bytes]
slowring.png
slowring.png
Mar 3, 2020  • #48
Avatar from Gravatar.com
JordanMillward_1
2 discussion posts
Quote:
So guys here is an Update.
I put my windows on the slowring see attached.
I got the xbox beta app running, and no issues.
I have had it running for several weeks/days now, and no issues anymore.


None of us can see the thing you attached. Try putting the picture on Imgur or the like and share the link.
Mar 3, 2020  • #49
Avatar from Gravatar.com
mojotaker
5 discussion posts
Quote:
So guys here is an Update.
I put my windows on the slowring see attached.
I got the xbox beta app running, and no issues.
I have had it running for several weeks/days now, and no issues anymore.


What was in the image, I have transcribed it out below.

Edition: Windows 10 Pro
Version: 2004
Installed on: 2/17/2020
OS build: 19041:113
Mar 3, 2020  • #50
Avatar from Gravatar.com
Micko
2 discussion posts
I thought I'd follow up after finally working out what was causing my intermittent flickering windows, focus loss, and applications not responding. There were heaps of other random problems, crashes, errors and blue screens. I spent way too long assuming it was hardware or drivers or a rogue application.

The video I posted of the DisplayFusion settings shows the flickering in action but it had nothing to do with DisplayFusion.

This registry key existed but had no value.
HKEY_CURRENT_USER\Control Panel\Desktop\HungAppTimeout
Mar 4, 2020  • #51
Avatar from Gravatar.com
Nathan Dick
2 discussion posts
Quote:
Quote:
So guys here is an Update.
I put my windows on the slowring see attached.
I got the xbox beta app running, and no issues.
I have had it running for several weeks/days now, and no issues anymore.


What was in the image, I have transcribed it out below.

Edition: Windows 10 Pro
Version: 2004
Installed on: 2/17/2020
OS build: 19041:113

So hopefully, in theory, the upcoming Anniversary update within the next couple months will include this fix.
Mar 6, 2020  • #52
Avatar from Gravatar.com
Antoine Roche
1 discussion post
Hi guys !

Just for letting you now that I have the same random issue, and now that you pointed at the Xbox app I have to tell it would make sens. Personnaly when I'm writing on my second screen (on Steam, Discord or TweetDeck in my browser for exemple) the focus go randomly back to the app on my main screen. A fix in Windows 10/the Xbox app or Display Fusion would be very nice !
Mar 18, 2020  • #53
Jon Tackabury (BFS)'s profile on WallpaperFusion.com
Thank you for the information! We're a bit backed-up right now but we'll take a look as soon as we can and get back to you. Thanks!
Mar 19, 2020  • #54
Keith Lammers (BFS)'s profile on WallpaperFusion.com
We haven't been able to specifically find anything in DF that would fix this, but others have mentioned in the latest Windows 10 insider builds it no longer seems to be an issue, so hopefully the next Windows updates will fix it up
Mar 20, 2020  • #55
Was this helpful?  (4)  
<< DiscussionsReply