On Mon Jul 1 16:53:05 2024 +0000, Tim Clem wrote:
Actually, I just had a realization - we're not going to be capturing minimized windows, we're going to be capturing *hidden* ones. In the actual use case for this code, we're trying to grab an image of a child window that's about to be hidden because its zero-sized parent is miniaturizing; we're not trying to snapshot the parent itself. The hacky way we're testing isn't representative of what would really happen. The good news is that snapshotting a hidden window does seem to work without a delay. I'll try to find a real-world application that relies on this behavior, or make one myself.
Ok, here's an application that exercises this functionality: https://www.hydrocad.net/flex/download.htm. Note that I had issues running it on Apple Silicon for some reason I did not debug; it works fine on Intel.
And it's bad news. Capturing a hidden/hiding child window does not do what we want. It *does* call back the `captureImageWithFilter:` block immediately, but the image is not of the window.
Barring some intervention from Apple, I don't think this API is going to work for us. I'll keep investigating, but I think we're either going to have to deal with the permissions prompt or disable the functionality for Sequoia.