On Tue Nov 4 16:56:12 2025 +0000, Marc-Aurel Zent wrote:
How about the current version? Does that work for you? We don't really have a need for a ime query event anyways, since that does not call into any Wine functions (and I assume this used to be the case before one of the many refactors). We can drop `QUERY_EVENT_NO_PREEMPT_WAIT` for sure now (since it is not used by any event anymore) and all the other queries as well soon with what I am working on currently. This is actually worse than I originally thought, since we are quite often blocking the UI main thread for extended periods of time (up to 0.3s), depending on where and how fast we can drain these events. And as @rbernon mentioned above, we should also not be doing so outside of `NtUserMsgWaitForMultipleObjectsEx`, which macdriver currently does with that mechanism when dispatching to the main thread from any thread.
It looks good to me. I could also feel improved responsiveness under certain conditions.
In the old code, query_ime_char_rect called ImmRequestMessage. Some programs require this, but implementing it is tricky due to the current PE-UNIX separation, and it could potentially reduce IME responsiveness.
Since it can be compensated for by calling SetIMECompositionRect in functions like NtUserSetCaretPos, it should be fine. Regarding SetIMECompositionRect, Wine currently needs some minor adjustments, so I'll proceed with a separate MR.