Re: [AD] Using system mouse cursor

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


Evert Glebbeek wrote:
Cleaned up patch. I mainly fixed the problems with position_mouse() not working properly with the hardware cursor enabled. The default mode with this patch is still Allegro's current behavior: the user has to call enable_hardware_cursor() explicitly for the hardware cursor to be available in X.

I'm still not sure about the behavior of the patch. It still seems to have conditional mouse warping when the hardware cursor is disabled, which can cause problems with thew mouse getting out of the window. IMO, the mouse should be unable to leave the app area when the hardware mouse is disabled, otherwise you run the risk of the mouse leaving the window and failing to get mickeys. The hardware mouse should move as little as possible when the software mouse is enabled. Also, I think the GUI should automatically try to enable the hardware cursor, if the cursor is set to show on the screen/a video bitmap.

There is one potential trouble spot with this patch: calling position_mouse() repeatedly from within a tight loop will flood the X11 event queue, pretty much making the application unresponsive.

I think this will only happen if it's called repeatedly, with less than 10ms between calls (which is the speed of the input thread, which will force a flush of the queue for the new thread/context).

- Kitty Cat




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