Change mouse motion callback to use FROM and TO, instead of AT.