Re: [AD] Mouse Locking

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


On Wed, 20 Oct 2004 02:30:13 +0200, Elias Pschernig <allefant@xxxxxxxxxx> wrote:
> >
> > Anyway, what im thinking is an additional two
> > functions in the API, lock_mouse(), and
> > release_mouse().  What do you guys think of the idea?
> >
> 
> I think it's a good idea. And instead of  just the window, it should
> be combined with set_mouse_range.

Yes, though my method would be having the software mouse enabled would
lock the mouse to the window (since we may have to do mouse warping
anyway), which you could disable by enabling the hardware mouse (even
if the hardware mouse isn't avialble, it'd still allow the mouse to
leave the window then). I still don't think many Allegro programs are
designed for windowed mode where the mouse is free to leave the
window, and the ones that do work already contain hacks that wouldn't
interfere (calling set_mouse_position regularly). The only apps that
would be ok with the mouse leaving are GUI apps, and we can make some
kind of special-case for that (or implicitly enable the hardware mouse
there).

- Kitty Cat




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