When working in windowed mode and using al_hide_mouse_cursor(true), sometimes the mouse cursor will become unhidden by the OS, usually when the cursor exits the display window. The AllegroFlare/DisplaySettingsInterfaces/Livemouse_cursor_hidden will not update when this occurs, and sometimes results in more issues with toggle_hide_mouse_cursor().
Ideally, the cursor should unhide when exiting the display, and then re-hide upon entering the display.
Switching between fullscreen and windowed should not break the synchronization either.
Another option is to see if Allegro5 can support polling for the show/hide status of the cursor (though this would mean a polling behavior which is not great.)
This is currently the behavior on MacOS, and has not been tested on other platforms.
When working in windowed mode and using
al_hide_mouse_cursor(true)
, sometimes the mouse cursor will become unhidden by the OS, usually when the cursor exits the display window. TheAllegroFlare/DisplaySettingsInterfaces/Live
mouse_cursor_hidden
will not update when this occurs, and sometimes results in more issues withtoggle_hide_mouse_cursor()
.Ideally, the cursor should unhide when exiting the display, and then re-hide upon entering the display.
ALLEGRO_EVENT_MOUSE_LEAVE_DISPLAY
(https://liballeg.org/a5docs/trunk/events.html#allegro_event_mouse_leave_display) or similar events