<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">2016-08-07 17:18 GMT+02:00 Henrik Nergaard <span dir="ltr">&lt;<a href="mailto:henrik.nergaard@uia.no" target="_blank">henrik.nergaard@uia.no</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">





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

<br><br>
<br></blockquote></div><br></div></div>