EarTrumpet
EarTrumpet copied to clipboard
EarTrumpet steals window focus on resolution change.
I have MPC-HC/MadVR playing my video files (full screen), madvr changes my output to 1920x1080 for any video files 1080p or lower (3840x2160 for the rest).
Whenever playing video files that cause the resolution to change, I can verify EarTrumpet is stealing focus (verified with http://www.happydroid.com/focus), I then have to click the mouse on the full screen video window to return focus to MPC-HC, none of my keyboard controls work until then.
Exiting EarTrumpet from the tray resolves this issue, further pointing to it stealing focus.
@djc5166 Can you provide the versions of Windows 10, MPC-HC, and MadVR you're using? I'm on Windows 10 1909 (18363.535), MPC-HC 1.7.13 (e37826845) with MadVR v0.92.17 and can't reproduce this behavior.
Do you have the EarTrumpet full mixer window open? Or is it just sitting quietly in the tray? Can you also grab the troubleshooting data in EarTrumpet > Settings > About? Thanks!
Windows 10 1909 (18363.535) MadVR v0.92.17 MPC-HC (64-bit) (codecguide.com): Version: 1.9.0 (bfaf63b3b)
In MadVR, for 4k content i use '2160p23', for 1080p or lower I use '1080p119', the switch to/from my native 3840x2160 into the 1080p119 seems to trigger ET to steal focus. ET is just sitting unselected in the tray.
I have a lot of VFR content at <1080p, so ~120hz seems to be the best way to play them, MadVR's 'smooth motion' makes a bit of a mess out of that stuff for me. tmpC9CA.tmp.txt
@djc5166 Thanks, can you reproduce the issue, then immediately collect EarTrumpet diagnostics? This will ensure we have fresh data to work with. Also, is EarTrumpet configured with any hotkeys?
Sorry I had actually lost access to this machine, had to RMA some parts. It was taking a long time to get them back because of delays due to COVID. But I am able to get this to happen on my main machine in a different but similar situation.
I have just bought DragonAge2 on steam, sometimes when launching it I get the same focus stealing that I experienced with ET vs MadVR.
I'm not sure if it is -exactly- the same issue, or it might just be DA2's fault, but its still strange i see ET popping up here, it definitely has a similar signature.
Whenever I can rebuild my HTPC machine I will go back and reproduce the original issue for you and grab the logs.
Here is the log taken immediately after ET is stealing focus (DA2 is still running).
focus log (don't know if you actually need this, but this is how I can see ET is infact stealing focus):
15696:D:\Steam\steamapps\common\Dragon Age II\bin_ship\DragonAge2.exe | Mon Jun 15 04:20:00 2020 2900:C:\Program Files\WindowsApps\40459File-New-Project.EarTrumpet_2.1.7.0_x86__1sdd7yawvg6ne\EarTrumpet\EarTrumpet.exe | Mon Jun 15 04:20:07 2020
Did these help at all?
I finally tracked down my focus-stealing problem to EarTrumpet. When launching the (very old) MMO Lord of the Rings Online, if I have EarTrumpet running, it immediately bounces back to the desktop. I am running at 4k desktop resolution, and I have to run LotRO at 1k.
I think it might have something to do with the scaling, with EarTrumpet reacting to scaling changes. Let me know if you need logs from me. This is reproducible on my system, as long as the problem is happening. (Sometimes it does not, for no readily discernible reason.)
Great someone else is having a similar issue, can we have someone look at this?
If you can provide step-by-step instructions on reproducing this, happy to take a look.
Here is some logs right after the original issue, I dont think I ever grabbed them. My machine is back up and running now.
I will have to come up with some exact steps.
It seems to be any madVR profile that changes from your desktop resolution. Either 3840x2160 to 1920x1080 or vice versa.
Also this is the same thing happening with DA2, and I would guess the same thing with renbear's situation.
I have the same problem unfortunately, with a bunch of games, because I use a 4k screen, but play most games in 1080p for performance reasons. It doesn't seem to happen with every game, though.
If you want to give reproducing another try, I'd recommend trying a bunch of games and setting them to exclusive fullscreen mode at a lower resolution than your monitor provides. Like 720p on a 1080p screen.
I can kinda "fix" the issue by really, really quickly moving the mouse to where the fullscreen "window" opens, and clicking frantically. That's quite annoying though, especially when I tab out and into the game several times. For now I just gotta avoid EarTrumpet unfortunately, although I really loved it to death for how quick it gets me to the mixer and mute options.
I found the source of the problem with a little program called Focus Logger btw.
I have the same problem unfortunately, with a bunch of games, because I use a 4k screen, but play most games in 1080p for performance reasons. It doesn't seem to happen with every game, though.
If you want to give reproducing another try, I'd recommend trying a bunch of games and setting them to exclusive fullscreen mode at a lower resolution than your monitor provides. Like 720p on a 1080p screen.
I can kinda "fix" the issue by really, really quickly moving the mouse to where the fullscreen "window" opens, and clicking frantically. That's quite annoying though, especially when I tab out and into the game several times. For now I just gotta avoid EarTrumpet unfortunately, although I really loved it to death for how quick it gets me to the mixer and mute options.
I found the source of the problem with a little program called Focus Logger btw.
it's the same way on my machine, turns out that is this app minimizing the foreground app when it enter fullscreen. did't expect this. but after upgate to the latest version of EarTrumpet the issue was gone for me.
Well that's great news, because indeed I chose to stay away from EarTrumpet for the time being. I'll give it another try. Thank you very much for the update!
EDIT: After a few days of usage, it seems to be just fine. Thanks again for the update. I suppose this can be closed, if anyone's still reading.
Still occurring for me even with the latest dev version with The Sims 1 and other games :(
Using version 2.2.2.0 from the Windows Store

This is what happens when it steals focus, the dropdown gets all weird. Only occurs once and the focus stealing issue goes away. The dialog returns to normal with no focus stealing after restarting EarTrumpet.
Only happens when running applications at less than native resolution. I use a 1440p display at 125% scaling btw, display scaling seems to be the cause.
I've been using EarTrumpet again for maybe around 2 week or so, and SO FAR I haven't encountered any issues. But most games nowadays use borderless fullscreen and stuff, so I can't even really tell if an actual fullscreen game is still conflicting with EarTrumpet.
I can confirm that, I used http://www.happydroid.com/focus and EarTrumpet stealing focus of my full-screen apps, they are set to 1920x1080 resolution. Also got same issue like mentioned here: https://github.com/File-New-Project/EarTrumpet/issues/453#issuecomment-1423311450
@riverar I am using version 2.3.0.0 currently To recreate the issue display scaling in Windows must be set to 125% or higher and the game(s) must run fullscreen!
- Restart EarTrumpet and DO NOT click on the EarTrumpet icon in the taskbar
- Run a game that forces the display/desktop to run at a lower than native display resolution, the game will minimize and focus is stolen once. Returning to the game will work.
Now that EarTrumpet has the visual glitch (shown in image I posted previously), it won't steal focus again until EarTrumpet or Windows is restarted fully. I'm not sure if Fast Startup interacts with this bug, regardless I don't have it enabled FYI.
I'm on, uhhh.... 2.2.2.0 and I've never had ANY issues for a LONG time... I wouldn't presume anything has changed, though.
Ok, just discovered that at 100% display scaling (restarting EarTrumpet each time) that EarTrumpet that does not steal focus. Focus stealing for me only happens when at 125% display scaling or higher (set in Windows' Settings app) and when games run in fullscreen.
Seems EarTrumpet doesn't like having to switch display scaling and focus at the same time if it's taskbar icon isn't opened at least once.
Hm... I'm using scaling.. Care to say what game it is that's giving you trouble?
Need for Speed Most Wanted (2005), The Sims 1, TrackMania Nations Forever, Half-Life 2 (Steam version) etc.
Just make sure to set any game to a resolution lower than your display's native resolution, and that they are not windowed or running in borderless fullscreen/windowed (must be running fullscreen)
Interesting, will try that here with your additional steps and scaling. And you're on Windows 10 or Windows 11?
Interesting, will try that here with your additional steps and scaling. And you're on Windows 10 or Windows 11?
Windows 10 22H2
@riverar Can you take a look at reproducing this?
Will do today, thanks for the ping. If we can reproduce this, it's likely a Windows bug. Fingers crossed it's something we can help mitigate.
Reproduces on Windows 10 19045.2006. @mrpenguinb can you confirm this is what you see?
https://github.com/File-New-Project/EarTrumpet/assets/475132/fe64c374-bd83-4a92-94da-10e0889ccd6c
As reported, if EarTrumpet is opened more than once, the problem does not occur.
https://github.com/File-New-Project/EarTrumpet/assets/475132/9c313120-28e5-4d51-a288-6e5496b66356
WPF is calling SetWindowPos on our window when DPI changes, without the SWP_NOACTIVATE flag 🤦♂️
Tracking issue: https://github.com/dotnet/wpf/issues/7561
Reproduces on Windows 10 19045.2006. @mrpenguinb can you confirm this is what you see? 2024-01-13.16-20-43.mp4
Yup, you got it!! :D Glad that the issue has been cornered. Now to wait for a fix from WPF......