[OpenSmalltalk/opensmalltalk-vm] Win32 event generation mixes up timeGetTime() and GetMessageTime() (#509)
I'm just starting to get familiar with this repository, and I found out something interesting: On Windows, the timestamps of DND (drag and drop) events received from the VM differ by loads from the timestamps of mouse move events. For example, I recorded some event sequences where the former were circa 7140, and the latter, just recorded a few seconds later, were 21276406. In other cases, the difference I measured was about 57 seconds, not sure whether cause or coincidence.
Looking into sqWin32Window.c, this may be caused by the fact that recordDragDropEvent() calls ioMicroMSecs() which calls timeGetTime() from timeapi.h and trims the result to fit into a SmallInteger. On the contrary, recordMouseEvent(), and so recordMouseDown(), recordKeyboardEvent(), and others called from MainWndProcW(), use GetMessageTime() from winuser.h as time stamp which is not truncated, too.
Do we indeed need to use two different approaches, two different APIs here? This is very impractical for me as I cannot compare the timestamp of events from different sources. Would it be possible to decide for one API and one byte count? Looking forward to your feedback!