I'm attaching two patches that fixes some issues. I think it will be helpful for your testing. If you think it would be valuable, please apply.
[0001-winex11-Call-event-handlers-immediately-on-non-merge.patch](/uploads/873e0e8d9f9168d4747c386b34c4e591/0001-winex11-Call-event-handlers-immediately-on-non-merge.patch)
[0002-winex11-Use-NtUserGetAncestor-for-the-foreign-window.patch](/uploads/6685e01c87f0abe5555c78aed54819f3/0002-winex11-Use-NtUserGetAncestor-for-the-foreign-window.patch)