On Sun Oct 26 15:32:03 2025 +0000, Byeongsik Jeon wrote:
The Japanese keyboard issue is caused by the timeout:0.3 in firstRectForCharacterRange:. This causes a 0.3s delay. ~~It appears to be related to QUERY_EVENT within OnMainThread.~~ Update: I haven't quite grasped the code path yet, but anyway, I think starting here should be fine.
Since macdrv_ime_process_key uses OnThreadMain, the WineQueryNoPreemptWait flag is no longer needed. This was introduced in ! 33610da.
Unlike Korean keyboard, Japanese keyboard IME processing calls firstRectForCharacterRange earlier. When the Japanese keyboard response is delayed, it appears to additionally call the firstRectForCharacterRange method, which can occur after macdrv_ProcessEvents. Due to delayed query event processing, a timeout occurs. The number of firstRectForCharacterRange/query_ime_char_rect pairs differs.
Like other query events, this event should also be handled in OnMainThread.