<div dir="ltr"><div dir="ltr"><div>Hi Marcel,</div><div>I'm fine with that, we want to have MouseWheelEvent structure matching that of other MouseEvent at image side.</div><div>My question was why the hell having a different field usage at VM side!<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Le jeu. 26 déc. 2019 à 15:50, Marcel Taeumel <<a href="mailto:marcel.taeumel@hpi.de">marcel.taeumel@hpi.de</a>> a écrit :<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><div id="gmail-m_1015289532449808952__MailbirdStyleContent" style="font-size:10pt;font-family:Arial;color:rgb(0,0,0)">
                                        Also note that "<span style="font-family:Arial,Helvetica,sans-serif;font-size:13px">(lastMouseEvent buttons </span><span style="font-family:Arial,Helvetica,sans-serif;font-size:13px">bitAnd: 7)" reads the #buttons field  in the event object, which combines field 5 and 6 of the raw mouse-event array.</span><div><span style="font-family:Arial,Helvetica,sans-serif;font-size:13px"><br></span></div></div></div></blockquote><div>This is the part that I don't want to see.</div><div>I understand that you did that because of VM deficiency to provide those states.</div><div>The question is again, why the hell wouldn't the VM deliver those states?<br></div><div><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><div id="gmail-m_1015289532449808952__MailbirdStyleContent" style="font-size:10pt;font-family:Arial;color:rgb(0,0,0)"><div><span style="font-family:Arial,Helvetica,sans-serif;font-size:13px"></span></div><div><span style="font-family:Arial,Helvetica,sans-serif;font-size:13px">Best,</span></div><div><span style="font-family:Arial,Helvetica,sans-serif;font-size:13px">Marcel</span></div><div></div><blockquote type="cite" style="border-left-style:solid;border-width:1px;margin-top:20px;margin-left:0px;padding-left:10px">
                        <p style="color:rgb(170,170,170);margin-top:10px">Am 26.12.2019 15:48:23 schrieb Marcel Taeumel <<a href="mailto:marcel.taeumel@hpi.de" target="_blank">marcel.taeumel@hpi.de</a>>:</p><div style="font-family:Arial,Helvetica,sans-serif"><div id="gmail-m_1015289532449808952__MailbirdStyleContent" style="font-size:10pt;font-family:Arial;color:rgb(0,0,0)">
                                        Hi Nicolas,<div><br></div><div>I tried to document that in EventSensor class comment:</div><div><br></div><div>...</div><div><div><span style="font-size:13.3333px">Mouse-wheel event structure</span></div><div><span style="font-size:13.3333px">==========================</span></div><div><span style="font-size:13.3333px">Mouse-wheel events are generated when mouse-wheel input is detected.</span></div><div><span style="font-size:13.3333px">[1] - event type 7</span></div><div><span style="font-size:13.3333px">[2] - time stamp</span></div><div><span style="font-size:13.3333px">[3] - horizontal scroll delta</span></div><div><span style="font-size:13.3333px">[4] - vertical scroll delta</span></div><div><span style="font-size:13.3333px">[5] - button state (same as in mouse events)</span></div><div><span style="font-size:13.3333px">[6] - modifier keys (same as in mouse events)</span></div><div><span style="font-size:13.3333px">[7] - reserved.</span></div><div><span style="font-size:13.3333px">[8] - host window id.</span></div></div><div><span style="font-size:13.3333px">...</span></div><div><span style="font-size:13.3333px"><br></span></div><div><span style="font-size:13.3333px">SHIFT + RED + WHEEL-UP should be possible, right?</span></div><div><span style="font-size:13.3333px"><br></span></div><div>RED -> [5]</div><div>SHIFT -> [6]</div><div>WHEEL UP -> [3]</div><div><br></div><div>Best,</div><div>Marcel</div><div></div><blockquote type="cite" style="border-left-style:solid;border-width:1px;margin-top:20px;margin-left:0px;padding-left:10px">
                        <p style="color:rgb(170,170,170);margin-top:10px">Am 26.12.2019 00:42:49 schrieb Nicolas Cellier <<a href="mailto:nicolas.cellier.aka.nice@gmail.com" target="_blank">nicolas.cellier.aka.nice@gmail.com</a>>:</p><div style="font-family:Arial,Helvetica,sans-serif"> Hi all,
<br>I'm in my way of implementing mousewheel events on windows VM.
<br>
<br>If I understand it correctly, we fill the buttons field of the event buffer
<br>with modifiers states, and we don't fill the modifiers field of the event
<br>buffer...
<br>
<br>This sounds very strange to me.
<br>See
<br><a href="https://github.com/OpenSmalltalk/opensmalltalk-vm/commit/897ef1725e32c2eb3d24e3402b2e95b114b8b28b" target="_blank">https://github.com/OpenSmalltalk/opensmalltalk-vm/commit/897ef1725e32c2eb3d24e3402b2e95b114b8b28b</a>
<br>(I've commented the lines that I find questionable)
<br>Eliot, do you remember why?
<br>
<br>It gives this image code:
<br>
<br>generateMouseWheelEvent: evtBuf
<br>    ...snip...
<br>     modifiers := evtBuf fifth.
<br>    buttons := (modifiers bitShift: 3) bitOr: (lastMouseEvent buttons
<br>bitAnd: 7).
<br>
<br>while other mouse events are:
<br>
<br>generateMouseEvent: evtBuf
<br>    ...snip...
<br>     buttons := evtBuf fifth.
<br>     modifiers := evtBuf sixth.
<br>
<br>I'd be happy to see more uniformity, sixth field is not used.
<br><div dir="ltr"><div>Hi all,</div><div>I'm in my way of implementing mousewheel events on windows VM.</div><div><br></div><div>If I understand it correctly, we fill the buttons field of the event buffer with modifiers states, and we don't fill the modifiers field of the event buffer...</div><div><br></div><div>This sounds very strange to me.</div><div>See <a href="https://github.com/OpenSmalltalk/opensmalltalk-vm/commit/897ef1725e32c2eb3d24e3402b2e95b114b8b28b" target="_blank">https://github.com/OpenSmalltalk/opensmalltalk-vm/commit/897ef1725e32c2eb3d24e3402b2e95b114b8b28b</a></div><div>(I've commented the lines that I find questionable)</div><div>Eliot, do you remember why?</div><div><br></div><div>It gives this image code:</div><div><br></div><div>generateMouseWheelEvent: evtBuf<br></div><div>    ...snip...<br></div><div>       modifiers := evtBuf fifth.<br>         buttons := (modifiers bitShift: 3) bitOr: (lastMouseEvent buttons bitAnd: 7).</div><div><br></div><div>while other mouse events are:</div><div><br></div><div>generateMouseEvent: evtBuf <br></div><div>    ...snip...<br></div><div>            buttons := evtBuf fifth.<br>          modifiers := evtBuf sixth.</div><div><br></div><div>I'd be happy to see more uniformity, sixth field is not used.<br></div></div>
<br></div></blockquote>
                                        </div></div></blockquote>
                                        </div></div></blockquote></div></div>