<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">2016-08-07 18:13 GMT+02:00 marcel.taeumel <span dir="ltr"><<a href="mailto:Marcel.Taeumel@hpi.de" target="_blank">Marcel.Taeumel@hpi.de</a>></span>:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Nicolai Hess-3-2 wrote<br>
> 2016-08-07 17:18 GMT+02:00 Henrik Nergaard &lt;<br>
<br>
> henrik.nergaard@<br>
<br>
> &gt;:<br>
<div><div class="h5">><br>
>> Hmm.<br>
>><br>
>> ActiveHand lastEvent “"[(798@340) mouseOver SHIFT nil nil]"<br>
>><br>
>> ActiveHand instVarNamed: #lastEventBuffer "#(1 148008281 659 126 0 0 1<br>
>> 1)"<br>
>> “Timestamp is there, second element”<br>
>><br>
>><br>
>><br>
>> I cannot see that the stamp is ever 0 from a raw event polled, and I<br>
>> guess<br>
>> that will (should) never happen?<br>
>><br>
>> Ie; in HandMorph >> generateMouseEvent: line 15 “stamp = 0 ifTrue: [<br>
>> stamp<br>
>> := Time milisecondClockValue ]” is dead/wrong code?<br>
>><br>
>><br>
>><br>
>> So I guess that somewhere along the event dispatching/processing (after<br>
>> he<br>
>> event has been moved from the raw buffer into a MorphicEvent subclass<br>
>> object) things are copied/translated without keeping the original<br>
>> timestamp<br>
>> intact.<br>
>><br>
>> I found at least two places that causes the timestamp to be lost:<br>
>><br>
>> MouseEvent >> asMoueMove (sets a new timestamp using Time)<br>
>><br>
>> MouseEvent >> asMouseOver<br>
>><br>
><br>
> Yes, that is what I meant by generating mousemove/mouseover events.<br>
> For example, if you put<br>
> Transcript show:{ evt type. evt timeStamp . firstClickTime} ;cr.<br>
><br>
> at top of method handleEvent:from:<br>
><br>
> and click (just click no movement) on the title pane of a system window,<br>
> you'll see a alot of<br>
> #(#mouseMove 9128631 12518171)<br>
> Transcript entries<br>
><br>
> The entries look like they are new events, but I think they are just<br>
> generated from the last real event , but with a new time stamp.<br>
><br>
><br>
>><br>
>><br>
>> I think there are two bugs here<br>
>><br>
>> 1) VM clock can differ from Image clock<br>
>><br>
>> 2) Translating one event from another do not keep the original<br>
>> timestamp<br>
>><br>
>><br>
>><br>
>> Best regards,<br>
>><br>
>> Henrik<br>
>><br>
>><br>
>><br>
>><br>
>><br>
</div></div>>> *From:*<br>
<br>
> squeak-dev-bounces@.<wbr>squeakfoundation<br>
<br>
> [mailto:<br>
>><br>
<br>
> squeak-dev-bounces@.<wbr>squeakfoundation<br>
<br>
> ] *On Behalf Of *Nicolai Hess<br>
>> *Sent:* Sunday, August 7, 2016 3:57 PM<br>
>> *To:* Pharo Development List &lt;<br>
<br>
> pharo-dev@.pharo<br>
<br>
> &gt;; The<br>
>> general-purpose Squeak developers list &lt;squeak-dev@lists.<br>
> &gt; <a href="http://squeakfoundation.org" rel="noreferrer" target="_blank">squeakfoundation.org</a>><br>
>> *Subject:* [squeak-dev] Windows Time millisecondClockValue (system start<br>
<div><div class="h5">>> vs. image start)<br>
>><br>
>><br>
>><br>
>> Hi,<br>
>><br>
>> a call to<br>
>><br>
>> Time millisecondClockValue<br>
>><br>
>> gives the current milliseconds since the image started. Did this change ?<br>
>><br>
>> I have a windows squeak 4.4 VM where it gave the uptime of the system (on<br>
>> windows).<br>
>><br>
>> Background:<br>
>><br>
>> HandMorph generates some MouseOver and/or MouseMove events, and if the<br>
>><br>
>> timeStamp value is not set, it sets it to Time millisecondClockValue, but<br>
>> the "real" events have<br>
>><br>
>> a time stamp of "milliseconds since system was booted".<br>
>><br>
>><br>
>> So, now it can happen that you have a real event (mouse click) at<br>
>> timeStamp (msecs since boot up)<br>
>> 3000000<br>
>><br>
>> and afterwards a generated mouseOver event with a time stamp since image<br>
>> startup<br>
>><br>
>> 2000000 (if the image started ~15 min after system boot).<br>
>><br>
>> That is, a later event as a lower time stamp. This will disturb the event<br>
>> handling in<br>
>><br>
>> HandMorph>>#handleEvent: from:<br>
>><br>
>> Somehow, (after having the image running for a long time ? I don't know).<br>
>> The time stamp<br>
>><br>
>> for the generated events is allways much bigger than for the system<br>
>> events, and this<br>
>><br>
>> will make it impossible to detect double-click events.<br>
>><br>
>> see issue<br>
>> <a href="https://pharo.fogbugz.com/f/cases/18859" rel="noreferrer" target="_blank">https://pharo.fogbugz.com/f/<wbr>cases/18859</a><br>
>><br>
>> and<br>
>> <a href="http://stackoverflow.com/questions/38700587/double-" rel="noreferrer" target="_blank">http://stackoverflow.com/<wbr>questions/38700587/double-</a><br>
>> click-highlight-selection-in-<wbr>pharo-5-0<br>
>><br>
>><br>
>><br>
>> thanks<br>
>><br>
>> nicolai<br>
>><br>
>><br>
>><br>
>><br>
<br>
</div></div>Hi Nicolas,<br>
<br>
event time stamps have been broken in the Windows VM for a long time. See<br>
here:<br>
<a href="http://forum.world.st/win32-Morphic-event-timeStamp-bug-td4824244.html" rel="noreferrer" target="_blank">http://forum.world.st/win32-<wbr>Morphic-event-timeStamp-bug-<wbr>td4824244.html</a><br>
<br>
Best,<br>
Marcel<br>
<br></blockquote><div><br></div><div>Hi, Marcel, yes I saw that thread, we should *bump* it again. You solution was to modify the event time stamp to use the same milliseconds-since-image-start, right?<br><br></div><div>I too was confused about the ioMSecs implementation in sqWin32Windows with timeGetTime() vs. the one from sqWin32Heartbeat.c<br></div><div>It seems the windows vm uses the one from the heartbeat, but I couldn't find where this was set, did you find it out?<br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
<br>
<br>
--<br>
View this message in context: <a href="http://forum.world.st/Windows-Time-millisecondClockValue-system-start-vs-image-start-tp4909842p4909869.html" rel="noreferrer" target="_blank">http://forum.world.st/Windows-<wbr>Time-millisecondClockValue-<wbr>system-start-vs-image-start-<wbr>tp4909842p4909869.html</a><br>
Sent from the Squeak - Dev mailing list archive at Nabble.com.<br>
<br>
</blockquote></div><br></div></div>