While no mouse buttons are held, that gets two events, one with deviceEvent->deviceid being 2 and one with it being 10; the 10 fails the if and thus doesn't get processed.
Whereas when some mouse button is held down, only the 10==deviceEvent->deviceid event happens, and so nothing gets processed.
Hard-coding deviceEvent->deviceid there to always be 2 does give scroll updates, proving that receiving scroll updates while a button is held is possible, but of course such hard-coding won't work for an actual solution.
So far I've traced it down to this:
While no mouse buttons are held, that gets two events, one with
deviceEvent->deviceid
being2
and one with it being10
; the10
fails theif
and thus doesn't get processed.Whereas when some mouse button is held down, only the
10==deviceEvent->deviceid
event happens, and so nothing gets processed.Hard-coding
deviceEvent->deviceid
there to always be2
does give scroll updates, proving that receiving scroll updates while a button is held is possible, but of course such hard-coding won't work for an actual solution.