+ Time cur_motion_time = event->xmotion.time;
+ int x = event->xmotion.x;
+ int y = event->xmotion.y;
+ if(win->cursorhidden && cur_motion_time - win->player_event_time < IGNORE_MOTION_THRESHOLD_MS) {
+ int diff_x = abs(x - win->mouse_x_orig);
+ int diff_y = abs(y - win->mouse_y_orig);
+ if(diff_x > MOTION_POS_THRESHOLD_PIX || diff_y > MOTION_POS_THRESHOLD_PIX) {
+ WindowShowPlayerCursor(win);
+ }
+ } else {
+ win->mouse_x_orig = x;
+ win->mouse_y_orig = y;
+ }
+ win->player_event_time = cur_motion_time;
+ win->motion_playback_time = win->player->playback_time;