Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Auto-unhiding of mouse cursor causes asynchronization with DisplaySettingsInterface #264

Open
MarkOates opened this issue Mar 10, 2024 · 0 comments

Comments

@MarkOates
Copy link
Collaborator

MarkOates commented Mar 10, 2024

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/Live mouse_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.

  • There may be a solution using ALLEGRO_EVENT_MOUSE_LEAVE_DISPLAY (https://liballeg.org/a5docs/trunk/events.html#allegro_event_mouse_leave_display) or similar events
  • 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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant