This repository has been archived on 2024-06-25. You can view files and clone it, but cannot push or open issues or pull requests.
FreeGLUT-Vita/freeglut
jtsiomb 4a4f400ca7 Fixed mousewheel callbacks under X11. (bug #247, github issue #66)
The code had the incorrect assumption that button numbers mapped to the wheel
follow after the last "real" button as returned by the GLUT_NUM_MOUSE_BUTTONS
query, which in turn resolves to a call to XGetPointerMapping. In reality the
X server always sends button presses for 4 and 5 when a wheel is turned down/up
respectively, and the rest of the mouse buttons (if any) follow afterwards.
Also XGetPointerMapping doesn't seem to reliably return the number of actual
buttons, and in any case the wheel "buttons" are certainly included in the
count as they can be remapped.
Since we can't know if buttons after 5 are further wheels or regular buttons
this modification only ever invokes the wheel callback for wheel 0.


git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1844 7f0cb862-5218-0410-a997-914c9d46530a
2018-10-10 05:23:33 +00:00
..
freeglut Fixed mousewheel callbacks under X11. (bug #247, github issue #66) 2018-10-10 05:23:33 +00:00
web-src Corrected phrasing in docs and unneeded \ in code 2017-06-30 23:22:52 +00:00