https://github.com/ZILtoid1991/iota/blob/7299074d7013ab5664415ed9c9b9fc02bd29cfc9/source/iota/controls/polling.d#L80
https://github.com/ZILtoid1991/iota/blob/7299074d7013ab5664415ed9c9b9fc02bd29cfc9/source/iota/window/oswindow.d#L323
I have this very non-standard event loop for an input-output library. It has issues with processing and receiving certain messages. I’m only getting input language change messages by doing certain tricks (usually by changing the input method on the taskbar, then moving the window), but even then it often makes my app hanging. I also don’t get any device handles from raw input messages (always null, even with devices that supposed to have all time). It’s like if some other function calls, that would make things work as should, aren’t mentioned in the MS documentation, and is just assumed it’s common knowledge. Similar thing happened to me with SDL, when I was pulling my hair for not being able to get audio working, I even wrote my alternative library, then someone told me it’s common knowledge that you should call yet another function before starting the audio stream, except none of the few existing tutorials mentioned it (most just recommended you to use existing sound playback libraries instead of doing your own thing), and the documentation wasn’t clear on it (by not clear, it did not mention explicitly, other than being named prepareAudioStream
or something).