On Fri Sep 22 18:02:17 2023 +0000, Esme Povirk wrote:
I see there's at least a 0.5 second window for this. Would it be possible to set up the window such that the system won't focus it?
The 0.5 second window is when we do not expect a WinEvent to be passed through. I'm thinking it might make sense to filter by specific WinEvent parameters that we're listening for, e.g if we do `NotifyWinEvent` and we don't expect this particular WinEvent to be passed through to the `IProxyProviderWinEventHandler::RespondToWinEvent` method, we could fail the test if that specific set of parameters is delivered. The main point is to test whether or not a specific set of WinEvent parameters will result in `RespondToWinEvent` being invoked.
So, if we did that, and the system fired a WinEvent that was delivered and didn't meet our expected parameters, it'd just be ignored. The only issue with that would be if Windows somehow managed to send a duplicate. I guess in that circumstance, we could potentially clear the expected parameters once `RespondToWinEvent` is invoked/calls `AddAutomationEvent`.
I'll look into this further on Monday.