On Fri Sep 22 17:07:32 2023 +0000, Connor McAdams wrote:
At least in this circumstance, I'd imagine the likelihood is probably low. It will only pass EVENT_OBJECT_FOCUS for this particular event, and in that case it'd have to be fired by the system due to this specific HWND gaining focus. In all my testbot runs I have not seen this happen yet. I guess we could potentially gate this somehow so that if it doesn't match a combo of hwnd/obj_id it isn't checked, or just remove the check all together. Or, only do:
hr = IProxyProviderWinEventSink_AddAutomationEvent(event_sink, This->win_event_handler_data.responder_prov, This->win_event_handler_data.responder_event); ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
if it matches our expected WinEvent.
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?