/* Check if cursor state changed (down or move)  */
int TOUCH_StateChanged(void)
/* Check if cursor state changed (down or move)  */
int TOUCH_StateChanged(void)
{
  int result = 0;
  int diff, a, b;
  if (newpos.pen && !current_pos.pen) result = 1;
  a    = current_pos.x;
  b    = newpos.x;
  diff = a - b;
  if (abs(diff) > (int) touch_ignore_move) result = 1;
  a    = current_pos.y;
  b    = newpos.y;
  diff = a - b;
  if (abs(diff) > (int) touch_ignore_move) result = 1;
  return result;
}