Skip to content

[windows] Fix IME freezing window, don't filter messages by HWND

Charlie Jiang requested to merge cqjjjzr/freetype-demos:fix-win-ime into master


On systems with IME installed (e.g. Microsoft Pinyin IME for Chinese Windows, and MSIME for Japanese Windows), a hidden auxiliary window with caption Default IME is created. Also, there's an undocumented UserAdapterWindowClass receiving messages. Messages for all those child windows must be handled in the GUI thread properly, so we shouldn't use a per-HWND filter for GetMessage calls because it's the only spot polling the message queue.

If messages bound to those child windows aren't handled properly, and the window was created and focused with IME enabled, the window will just hang. Attaching a debugger shows that no further event is delivered to the window.

Related E-Mail:

Merge request reports