Re: [AD] Using system mouse cursor

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


> Sounds quite complex. I'm trying to get away from any kind of 
> mouse warping though.. I would like the OS's cursor position to be 
> the same as Allegro's cursor position as much as possible. AFAIK, 
> this is 100% possible.. set_mouse_position calls XWarpMouse (or 
> whatever it is) and offsets Allegro's internal position trackers 
> so the next mouse movement event that re-positions the mouse is 
> ignored (I thought I read the XWarpMouse causes X to send a mouse 
> movement event), but otherwise the internal variables are updated 
> as given by X.
> 
> Now, this obviously breaks Allegro programs.. get_mouse_mickeys is 
> gauranteed (by default) unlimited mouse movement. So what I 
> propose is this. Take a function like I've described, but extend 
> it like so:

This is more or less what I've whipped up last night. I want to do some
additional tests before subitting it here though.

With my patch, mouse warping is the default mode in X11 fullscreen and
disabled by default in windowed mode (similar to the Windows port).
Getting rid of the two-second-delay and switching modes simplifies the 
X mouse driver considerably too.

Evert




Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/