[OpenSmalltalk/opensmalltalk-vm] Win32 event generation mixes up timeGetTime() and GetMessageTime() (#509)

Previous Topic Next Topic
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

[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!

Related sources

You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or unsubscribe.

<script type="application/ld+json">[ { "@context": "http://schema.org", "@type": "EmailMessage", "potentialAction": { "@type": "ViewAction", "target": "https://github.com/OpenSmalltalk/opensmalltalk-vm/issues/509", "url": "https://github.com/OpenSmalltalk/opensmalltalk-vm/issues/509", "name": "View Issue" }, "description": "View this Issue on GitHub", "publisher": { "@type": "Organization", "name": "GitHub", "url": "https://github.com" } } ]</script>