My impression on Linux: The answer to “why did this ever work” is, that there are just enough internal mouse events indicating no movement (i.e. x and y coordinates are center_x and center_y), even if you’re currently moving the mouse. 1-2 per frame in my silly test program.
In that case line 281 if (x == center_x && y == center_y)
is true, and mouse->last_*
is reset to center_*
.
It seems like on Windows (10 with that Fall Creators Update) those events are a lot more rare - maybe this has changed and causes the bug to appear?