[Vm-dev] Miss-understanding mousewheel events

Nicolas Cellier nicolas.cellier.aka.nice at gmail.com
Wed Dec 25 23:42:29 UTC 2019


Hi all,
I'm in my way of implementing mousewheel events on windows VM.

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...

This sounds very strange to me.
See
https://github.com/OpenSmalltalk/opensmalltalk-vm/commit/897ef1725e32c2eb3d24e3402b2e95b114b8b28b
(I've commented the lines that I find questionable)
Eliot, do you remember why?

It gives this image code:

generateMouseWheelEvent: evtBuf
    ...snip...
     modifiers := evtBuf fifth.
    buttons := (modifiers bitShift: 3) bitOr: (lastMouseEvent buttons
bitAnd: 7).

while other mouse events are:

generateMouseEvent: evtBuf
    ...snip...
     buttons := evtBuf fifth.
     modifiers := evtBuf sixth.

I'd be happy to see more uniformity, sixth field is not used.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/vm-dev/attachments/20191226/1344e59e/attachment.html>


More information about the Vm-dev mailing list