On Mon, 6 May 2002, Mosfet wrote:

> Thanks for the replies Mark and Keith!
> 
> Interpolation isn't a problem but it just didn't seem to be like the frequency 
> of events was enough to accurately emulate the mouse motion when the mouse is 
> moved quickly. It certainly wasn't 60 or 120hz, at least I didn't get nearly 
> that many events or items in the mouse history... when the mouse is moved 
> quickly the gap is quite large. I'm almost positive apps like Gimp must be 
> getting more coordinates than this because doing things like spinning the 
> mouse in circles really fast gives more accurate results than interpolating 
> between MotionNotify coordinates would allow.

   The server will give you all the events the mouse produced while
the pointer was over the window.

> 
> For XGetMotionEvents I simply called it from the my MotionNotify handler with 
> the timestamp of the last MotionNotify event as the start time and 
> CurrentTime as the stop time. I assume this is a valid way to get all 
> positions and the result was the same as just using XMotionEvents themselves. 
> This gives a very wide spacing between points during fast movements.


   The temporal spacing for a constantly moving mouse should be the same.  
The spatial spacing will be larger when you move it faster, of course.  
More so because of pointer acceleration.

   You can increase the sampling rate in the Section "InputDevice"
in the XF86Config like follows:

        Option      "SampleRate" "80"

   The rates available depend on the type of mouse, but many go
as high as 200 Hz.  I don't know where the defaults are. 

   I've got a test app that plots the mouse path and also the
latencies as well as the computed sample rate at:

http://www.xfree86.org/~mvojkovi/mousetest.c

   You have to swipe the pointer across the window.  It starts 
collecting data when the pointer enters and stops when it leaves.


                                Mark.

_______________________________________________
Xpert mailing list
[EMAIL PROTECTED]
http://XFree86.Org/mailman/listinfo/xpert

Reply via email to