Re: [AD] Using system mouse cursor

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


>  >  void _xwin_move_mouse(int x, int y)
>  >  {
>  > -      _mouse_x = x;
>  > -      _mouse_y = y;
>  >  }
> 
> Does this mean position_mouse won't work under X anymore? I don't think
> it's a good idea to remove that. If you'd prefer, we can disable it for
> when the hardware mouse is active, but I don't think we really need to.

It should continue to work, I think. Those are the two lines I asked you to
try to put in to solve a problem that ended up making no difference.
If they do though, then yes, they should stay.

> This seems to suggest the mouse may or may not warp when we're in mickey
> mode. I think the best solution is to lock the mouse in the direct 
> center of the program window always, while the hardware mouse is 
> disabled, and just update Allegro's mouse variables as expected. That 
> way, we don't have to worry about the mouse sometimes getting warped and
> sometimes not.

You could be right, but since the default mode is to have mickeys enabled,
that will trap the mouse inside the Allegro window always (which is not a
good thing). The code you quoted is the current (or at least, 4.1.15 and
earlier) code, which seems to work well enough and not behave too badly.
I'm hesitant to change that too at the moment. I'd rather have the hardware
cursor working without causing problems it doesn't have to cause first and
then start cleaning up the mouse code afterwards instead of doing it all at
once.

Evert




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