[Vm-dev] [win32] Morphic event timeStamp bug

Marcel Taeumel marcel.taeumel at student.hpi.uni-potsdam.de
Mon May 4 11:41:06 UTC 2015


We identified a bug concerning either the #timeStamp in MorphicEvent objects
or Time >> #millisecondClockValue.

Inspecting the result of "ActiveEvent timeStamp - Time
millisecondClockValue" returns a suspiciously high number. 21373801 on my
last try.

So, the primitive 135, which is used for #millisecondClockValue, points
(cointerp.c) to ioMSecs(). For Windows this is "GetTickCount() &0x3FFFFFFF;"

Then, the keyboard event (here: CMD+P) gets its timeStamp assigned from the
MSG structure in sqWin32Window.c, which is good:

int recordKeyboardEvent(MSG *msg) {
evt->timeStamp = msg->time;

((( Only for drag/drop events into the VM, it uses ioMicroMSecs()
[cointerp.c], which is timeGetTime() and has a higher accuracy. )))

The MSDN says this:
MSG structure

And some interesting discussions about msg->time vs. GetMessageTime() :

Some ideas/questions:

- Why isn't the MillisecondClockMask applied to the message time as in
sqMacUIEvents.c ?
- Hmmmm....

Marcel & Bert

View this message in context: http://forum.world.st/win32-Morphic-event-timeStamp-bug-tp4824244.html
Sent from the Squeak VM mailing list archive at Nabble.com.

More information about the Vm-dev mailing list