factor out scroll detection
factor out scroll detection

darcs-hash:20080714114803-a887e-dab8b95ed753af6d19b4d6921f27bb22f13c1090.gz

thjaeger/easystroke,RaphaelRochet/easystroke,thjaeger/easystroke,RaphaelRochet/easystroke