You may find that the mouse is not moving due to the fact that you are not receiving motion events :-). Just use it.
You can, for example, set a reset timer each time a motion event is triggered. If the timer expires without a motion event (for example, after 1 s), you can start the animation before the motion event appears.
, , . , , , ( , , ).