gmamaladze / globalmousekeyhook

This library allows you to tap keyboard and mouse, detect and record their activity even when an application is inactive and runs in background.
MIT License
1.04k stars 257 forks source link

Global mouse move event not supressed #165

Open blackgat opened 1 year ago

blackgat commented 1 year ago

When using global mouse event capture, some mouse movement events are not suppressed even if I set the handled flag to true during dragging. In MouseListener, the member m_PreviousPosition is the root cause of this problem. It looks like the callback will get zero movement from the windows system, but if we can't suppress this event it will still make the mouse move. I wonder why it is necessary to check for zero motion in the callback? Isn't the design supposed to let the users of the library decide whether to deal with it or not?

I wrote a small program to demonstrate this problem.