Unable to select the window of an auto-minimise application
Opened this issue · 4 comments
Operating System Info
Windows 11
Other OS
No response
OBS Studio Version
32.0.0
OBS Studio Version (Other)
No response
OBS Studio Log URL
https://obsproject.com/logs/NpJ7eqxHU24f1wht
OBS Studio Crash Log URL
No response
Expected Behavior
I should be able to select auto-minimize applications for window capture.
I don't mean record while it's minimized. I just need to be able to select it in OBS, so that OBS can record it once I restore the window.
Current Behavior
For some application/games that auto-minimized, I cannot select them in any way via OBS.
Steps to Reproduce
- Run some game that auto-minimizes on alt-tab.
- Alt-tab to OBS (which minimizes the application).
- Try to select that game as a window in OBS.
- It doesn't show up in the list (since it's minimized).
- The game can't be captured.
Anything else we should know?
I'm not entirely sure whether this is a bug or feature request.
I also tried using Game Capture. That sometimes doesn't see these games and sometimes sees them but can't capture them (with any combination of options, "capture any full-screen application" also doesn't work).
I can sometimes fix this by tricking the game to prevent it from minimising, or by making the game windowed (if that's an option), which makes it show up in OBS, then I select it, and it captures correctly even if after I make it full-screen again (in the log above, I did exactly that).
In this particular case, I was running the game through Sandboxie. I think Game Capture also fails outside of that (I'm not 100% sure), but I would like to be able to capture in this scenario in any case.
Possible solutions
I can think of a few possible ways to fix this:
- Let me select any running application (not just any window).
- Maybe it could exclude minimised windows by default (to not pollute the default list). But then one of the options in the Window dropdown can be "select minimised application", which lists all apps. That could be in a separate pop-up, or it could just add the rest to the same Window dropdown temporarily (i.e. until you select a window or the dropdown is closed). It would be a long list, but that's better than simply not being able to capture any of those apps. Or there could be an option in the settings to allow showing minimised applications. Or this could be in a config file.
- Let me to write the window title myself (since it matches based on window title anyway).
- Check and store which windows there are every few seconds, then give the option to select any recent window. This means if I alt-tab out of the app and it minimises, it'll still show up, because it was recently a window.
- Make Game Capture work properly to capture any full-screen application. I guess that might be another bug, but that's potentially a lot harder to fix than just giving me the option to capture something OBS is already able to capture.
Just to note, I requested that this be opened, as it's unclear if we can do anything about it, but it's worth investigating.
If there is no solution, this will serve as good documentation for the future.
For Game Capture, we currently do list minimised applications because games are often minimised when not focused (especially when running fullscreen), so you should have no issues there.
For Window Capture, we explicitly hide minimised apps (and those without a real window) otherwise the list would be 8x as long and list a whole lot of apps users don't have any interest in capturing.
Is there a way to differentiate minimized apps that show up in the taskbar from system apps or whatever else don't have windows (maybe using all 3 checks of !IsWindowVisible, IsIconic and IsWindowCloaked excludes too much - not sure what the difference between not-visible, iconic and cloaked is, or maybe there's some other possible check)?
In any case: I listed a few other options in the issue description (edited), which would fix my issue if implemented, and which don't require showing minimized apps (by default or at all).
I've been able to find workarounds so far. Although finding workarounds is certainly somewhat annoying, and eventually I'll probably find a game I can't capture in any way whatsoever, given that I mostly rely on there being the option to make the game windowed. I had a game that didn't have that, and I could only capture it because the auto-minimize logic didn't kick in while the game was starting up, so I was able to get to OBS while the game was visible in the background (not minimized).
Then again, I guess I wouldn't be entirely out of options. I could just rename any old exe to match the filename of the game I'm trying to capture, to trick OBS by selecting that exe's window in order to capture the original window. It's very hacky. But honestly, that'll probably be less work than even just doing the workarounds every time.
Here's what my experimenting found:
Here's what Window Capture shows for me currently:
If I switch over to INCLUDE_MINIMISED, then the list matches "Application Audio Capture" exactly, as that's what that toggle is for, and you can simply add that source to see what would be displayed if we turned that off. In my case, it mostly just adds every Chromium tab as its own entry.
If I remove the IsWindowVisible check but keep the EXCLUDE_MINIMISED flag, here's what the same list looks like (it's 3x longer than what's visible, note the scrollbar):
About 70% of items in this list do have a size, and majority have names (though most are not useful names).