Re: [AD] Using system mouse cursor

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


Evert Glebbeek wrote:
Revised patch, with some obvious bugfixes. I removed the parameter on the public function and split the API into two functions: one to enable, one to disable the hardware cursor.

Hmm.. good call there. I suppose that does look a little cleaner. I do have two issues with the patch though..

>  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.

+   /* Don't enable warp mode if the hardware cursor is being displayed */
+   if (!_xwin.hw_cursor_ok)
+      _xwin.mouse_warped = ((permanent) ? 1 : (MOUSE_WARP_DELAY*7/8));

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.

- Kitty Cat




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