<p>I like the SDL events, and I already have them working on the Minheadless VM since 1-2 years ago:<br>
<a href="https://github.com/OpenSmalltalk/opensmalltalk-vm/blob/Cog/platforms/minheadless/sdl2-window/sqWindow-SDL2.c">https://github.com/OpenSmalltalk/opensmalltalk-vm/blob/Cog/platforms/minheadless/sdl2-window/sqWindow-SDL2.c</a></p>
<p>We can use this for fixing the Keyboard and MOUSE inconsistency in Morphic for both Squeak, and Pharo. Mouse button numbers are also not assigned the same way in all the platforms.</p>
<p>The VM events are pushed into queue (implemented with a circular buffer) that are fetched by the InputEventSensor >> #nextEvent method in Pharo.</p>
<p>The SDL2 based display support in the Minheadless VM also allows the VM to handle SDL2 events that are not directed to the main VM window by exposing the following three primitives:</p>
<ul>
<li>primitiveIsVMDisplayUsingSDL2<br>
-primitivePollVMSDL2Event -> Copy the content of a SDL_Event that is not directed to the VM window into a byteArray. These events are stored in separate circular buffer when they are received by the VM.</li>
<li>primitiveSetVMSDL2Input -> Registers an ExternalSemaphore which is signaled by the VM when an event is stored in this circular array.</li>
</ul>
<p>The support for using these primitives is already implemented and integrated in the standard Pharo 7 image. Using this VM fixes OSWindow event handling in Mac and Windows (in Linux it have been always working perfectly).</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you commented.<br />Reply to this email directly, <a href="https://github.com/OpenSmalltalk/opensmalltalk-vm/issues/396?email_source=notifications&email_token=AIJPEW6N4P4TPIS3BRXRCLTP2HJWRA5CNFSM4HP46HZKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODXSRETA#issuecomment-501551692">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AIJPEWZLAVZEMBYRKTU3P73P2HJWRANCNFSM4HP46HZA">mute the thread</a>.<img src="https://github.com/notifications/beacon/AIJPEW3JU6A3P2ATKWZQ6YLP2HJWRA5CNFSM4HP46HZKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODXSRETA.gif" height="1" width="1" alt="" /></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/OpenSmalltalk/opensmalltalk-vm/issues/396?email_source=notifications\u0026email_token=AIJPEW6N4P4TPIS3BRXRCLTP2HJWRA5CNFSM4HP46HZKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODXSRETA#issuecomment-501551692",
"url": "https://github.com/OpenSmalltalk/opensmalltalk-vm/issues/396?email_source=notifications\u0026email_token=AIJPEW6N4P4TPIS3BRXRCLTP2HJWRA5CNFSM4HP46HZKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODXSRETA#issuecomment-501551692",
"name": "View Issue"
},
"description": "View this Issue on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>