<div dir="ltr">Hilaire,<div><br></div><div>You want to make sure that your morph returns true both to #handlesKeyboard and #handlesMouseScroll:. You will also probably want to implement #mouseEnter: and do something like this inside it:</div><div><br></div><div>Preferences focusFollowsMouse ifTrue: [<br> event hand newKeyboardFocus: self.<br> self redrawNeeded ].<br></div><div><br></div><div>It's a bit hacky because mouse scroll events are pseudo mouse events (they actually come from the VM as keyboard events currently) which will follow mouse focus... but only if you have keyboard focus! When the VM consistently (i.e. across all platforms) provides them as raw mouse events we'll be able to clean this up.</div><div><br></div><div>Thanks,</div><div>Phil</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Apr 28, 2020 at 7:16 AM Hilaire Fernandes via Cuis-dev <<a href="mailto:cuis-dev@lists.cuis.st">cuis-dev@lists.cuis.st</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div>
<p><font size="+1">Hello,</font></p>
<p><font size="+1">I have this strange situation in the DrGeo window
where scroll events are not always caught by the underneath
canvas.</font></p>
<p><font size="+1">The drgeo windows is composed with several
submorphs: wheels and a sort of PasteUpMorph as the canvas.</font></p>
<p><font size="+1">In this canvas I can handle events as mouse down,
hover, over and scroll. They are handled just fine. However when
the mouse cursor moves away from the window then comes back,
the scroll events are not caught anymore by the canvas. Somehow
if I click on the window title, scroll event handling may come
back, or not, it is a bit random.<br>
</font></p>
<p><font size="+1">The issue seems to be related to mouse focus, not
sure.<br>
</font></p>
<p><font size="+1">Any idea?</font></p>
<p><font size="+1">Hilaire<br>
</font></p>
<pre cols="72">--
GNU Dr. Geo
<a href="http://drgeo.eu" target="_blank">http://drgeo.eu</a></pre>
</div>
-- <br>
Cuis-dev mailing list<br>
<a href="mailto:Cuis-dev@lists.cuis.st" target="_blank">Cuis-dev@lists.cuis.st</a><br>
<a href="https://lists.cuis.st/mailman/listinfo/cuis-dev" rel="noreferrer" target="_blank">https://lists.cuis.st/mailman/listinfo/cuis-dev</a><br>
</blockquote></div>