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. |
Hi Nicolas,
I tried to document that in EventSensor class comment: ... Mouse-wheel event structure ========================== Mouse-wheel events are generated when mouse-wheel input is detected. [1] - event type 7 [2] - time stamp [3] - horizontal scroll delta [4] - vertical scroll delta [5] - button state (same as in mouse events) [6] - modifier keys (same as in mouse events) [7] - reserved. [8] - host window id. ... SHIFT + RED + WHEEL-UP should be possible, right? RED -> [5] SHIFT -> [6] WHEEL UP -> [3] Best, Marcel
|
Also note that "(lastMouseEvent buttons bitAnd: 7)" reads the #buttons field in the event object, which combines field 5 and 6 of the raw mouse-event array.
Best, Marcel
|
Hi Marcel, I'm fine with that, we want to have MouseWheelEvent structure matching that of other MouseEvent at image side. My question was why the hell having a different field usage at VM side! Le jeu. 26 déc. 2019 à 15:50, Marcel Taeumel <[hidden email]> a écrit :
This is the part that I don't want to see. I understand that you did that because of VM deficiency to provide those states. The question is again, why the hell wouldn't the VM deliver those states?
|
Free forum by Nabble | Edit this page |