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