aardappel / procrastitracker

a Windows time tracking application
http://strlen.com/procrastitracker/
510 stars 54 forks source link

fix for mousewheel, suggested by Aleksandra Kalicinska #23

Closed jt-fuw closed 8 years ago

jt-fuw commented 8 years ago

There are two changes to src/Idletracker.cpp, suggested by Aleksandra Kalicinska in phone talk: use of different structure (now MSLLHOOKSTRUCT) in MouseTracker() and hInst instead NULL as arg 3 of SetWindowsHookEx(); the first fixes a bug causing ignoring mouse wheel (the original structure has fields of same names, but this for mouse wheel is at different offset); the second fixes a problem occuring at least on Windows XP: the SetWindowsHookEx() returned NULL when arg 3 was NULL and arg 4 was 0; possibly newer Windows versions work correctly when arg 3 is NULL, therefore I compare WINVER to limit the change to Windows XP.

aardappel commented 8 years ago

Looks good, thanks!