Esme Povirk (@madewokherd) commented about dlls/uiautomationcore/uia_com_client.c:
list_add_tail(&event_map->handlers_list, &event->event_handler_map_list_entry); event->handler_map = event_map; com_event_handlers.handler_count++;
- if (event_id == UIA_AutomationFocusChangedEventId)
- {
GUITHREADINFO info = { sizeof(info) };
if (GetGUIThreadInfo(0, &info) && info.hwndFocus)
uia_hwnd_map_add_hwnd(&event->focus_hwnd_map, info.hwndFocus);
It seems wrong to add this to the map without advising.